Biosynthesis of Steroidal Alkaloids Are Coordinately Regulated and Differ among Tomatoes in the Red-Fruited Clade
Michael P. Dzakovich1, David M. Francis2, and Jessica L. Cooperstone1,3*
1 Department of Horticulture and Crop Science, The Ohio State University, 2001 Fyffe Court, Columbus, OH 43210
2 Department of Horticulture and Crop Science, The Ohio State University/Ohio Agricultural Research and Development Center, 1680 Madison Ave., Wooster, OH 44691
3 Department of Food Science and Technology, The Ohio State University, 2015 Fyffe Court., Columbus, OH 43210 *Corresponding author (cooperstone.1@osu.edu)
You can find all the code used to conduct the analyses and create visualizations found in the above paper (and also a number that are not in the paper but relevant). We hope this is helpful!
This work is publicly available as a pre-print on bioRxiv https://www.biorxiv.org/content/10.1101/2021.01.06.425594v1, and currently undergoing peer review.
library(tidyverse) # for wrangling and ggplotting
library(ggrepel) # for repelling text labels
library(readxl) # for reading in excel files
library(scales) # for adjusting comma formatting in axes
library(FactoMineR) # for PCA
library(factoextra) # for PCA
library(patchwork) # for multi-panel plot arranging
library(ggdendro) # for making nicer looking dendrograms for hierarchical clustering
library(here) # for directory management
library(knitr) # for knitting and kable()
library(plotly) # for interactive plots
library(corrplot) # for correlation plots
library(ggcorrplot) # for gg correlation plots
Creating one, faceted boxplot to show concentrations of all ten alkaloids (dehydromtomatidine, tomatidine, dehydrotomatine, alpha-tomatine, hydroxytomatine, acetoxytomatine, dehydrolycoperosid/F/G/dehydrescueloside A, lycoperoside F/G/escueloside A, escueloside B and total alkaloids) separated by tomato class (cultivated processing, cultivated cherry, wide-cross hybrid, wild cherry, S. pimpinellifolium).
Alkaloids_raw <- read_excel("SteroidalAlkaloidsSupplementalData.xlsx",
sheet = "Raw Data Diversity Panel")
# what are the dimensions of this data?
dim(Alkaloids_raw)
## [1] 605 40
# what is the structure of this dataframe?
str(Alkaloids_raw)
## tibble [605 × 40] (S3: tbl_df/tbl/data.frame)
## $ ID : num [1:605] 7805 7898 7523 7724 7427 ...
## $ Year : num [1:605] 2018 2017 2018 2017 2018 ...
## $ Environment : chr [1:605] "FreEarly18" "Fre17" "FreLate18" "Fre17" ...
## $ Block : num [1:605] 1 2 2 1 1 2 1 2 1 2 ...
## $ Genotype : chr [1:605] "CULBPT_05_11" "CULBPT_05_11" "CULBPT_05_11" "CULBPT_05_11" ...
## $ Plot_Source : chr [1:605] "2K17-7724" "2K9-8584" "2K17-7724" "2K9-8584" ...
## $ Class : chr [1:605] "Cultivated Processing" "Cultivated Processing" "Cultivated Processing" "Cultivated Processing" ...
## $ Origin : chr [1:605] "USA" "USA" "USA" "USA" ...
## $ Provence : chr [1:605] "NY" "NY" "NY" "NY" ...
## $ Blanca_Cluster1 : chr [1:605] "SLL_processing_2" "SLL_processing_2" "SLL_processing_2" "SLL_processing_2" ...
## $ Blanca_Cluster2 : chr [1:605] "SLL_processing_2" "SLL_processing_2" "SLL_processing_2" "SLL_processing_2" ...
## $ Passport_Species : chr [1:605] "SLL" "SLL" "SLL" "SLL" ...
## $ Passport_Classification : chr [1:605] "SLL_processing_NY" "SLL_processing_NY" "SLL_processing_NY" "SLL_processing_NY" ...
## $ Sim_Grouping : chr [1:605] "Arid" "Arid" "Arid" "Arid" ...
## $ Latitude : chr [1:605] "40.712800000000001" "40.712800000000001" "40.712800000000001" "40.712800000000001" ...
## $ Longitude : chr [1:605] "-74.006" "-74.006" "-74.006" "-74.006" ...
## $ Dehydrotomatidine : num [1:605] 0 0 0.1357 0.0543 0.1395 ...
## $ Tomatidine : num [1:605] 0 0.169 0.681 0.497 0.554 ...
## $ Dehydrotomatine1 : num [1:605] 5.73 0 5.07 19.42 0 ...
## $ Dehydrotomatine2 : num [1:605] 0.35 0 0 0 0 ...
## $ TotalDehydrotomatine : num [1:605] 6.08 0 5.07 19.42 0 ...
## $ Tomatine : num [1:605] 172.7 55.5 123.9 239 64.3 ...
## $ Hydroxytomatine1 : num [1:605] 1.079 0 0 0 0.879 ...
## $ Hydroxytomatine2 : num [1:605] 86.7 53.3 50.9 36 39.9 ...
## $ Hydroxytomatine3 : num [1:605] 17.83 13.63 6.5 8.56 7.23 ...
## $ Hydroxytomatine4 : num [1:605] 9.14 4.84 1.37 7.48 3.02 ...
## $ TotalHydroxytomatine : num [1:605] 114.8 71.8 58.8 52.1 51 ...
## $ Acetoxytomatine1 : num [1:605] 18.9 3.56 3.93 3.34 0 ...
## $ Acetoxytomatine2 : num [1:605] 56.31 4.11 4.12 16.42 3.13 ...
## $ Acetoxytomatine3 : num [1:605] 1.89 0 0.623 1.057 0 ...
## $ TotalAcetoxytomatine : num [1:605] 77.1 7.66 8.68 20.81 3.13 ...
## $ DehydrolycoperosideFGdehydroesculeosideA: num [1:605] 5.13 2.91 2.19 0 0 ...
## $ LycoperosideFGEsculeosideA1 : num [1:605] 10.28 5.55 5.1 0 4.05 ...
## $ LycoperosideFGEsculeosideA2 : num [1:605] 337 200 259 203 300 ...
## $ TotalLycoperosideFGEsculeosideA : num [1:605] 347 205 264 203 304 ...
## $ EsculeosideB1 : num [1:605] 3.79 8.98 4.05 1.68 10.15 ...
## $ EsculeosideB2 : num [1:605] 0.924 1.898 0 0 0 ...
## $ EsculeosideB3 : num [1:605] 3.94 6.79 6.75 2.35 4.88 ...
## $ TotalEsculeosideB : num [1:605] 8.66 17.67 10.8 4.03 15.03 ...
## $ Total : num [1:605] 732 361 474 539 438 ...
Changing levels in Class so that plots go, left to right: Cultivated Processing, Cultivated Cherry, Wide Cross Hybrid, Wild Cherry, S. pimpinellifolium (from most cultivated, to most wild).
Alkaloids_raw$Class <- factor(Alkaloids_raw$Class,
levels = c("Cultivated Processing",
"Cultivated Cherry",
"Wide Cross Hybrid",
"Wild Cherry",
"S. pimpinellifolium"))
I want to make one boxplot, with alkaloid concentration on the y, and tomato class on the x, that is faceted by alkaloid (i.e., one plot per alkaloid).
To do this, we need to data wrangle and convert from wide to long (tidying).
# check structure
str(Alkaloids_raw)
## tibble [605 × 40] (S3: tbl_df/tbl/data.frame)
## $ ID : num [1:605] 7805 7898 7523 7724 7427 ...
## $ Year : num [1:605] 2018 2017 2018 2017 2018 ...
## $ Environment : chr [1:605] "FreEarly18" "Fre17" "FreLate18" "Fre17" ...
## $ Block : num [1:605] 1 2 2 1 1 2 1 2 1 2 ...
## $ Genotype : chr [1:605] "CULBPT_05_11" "CULBPT_05_11" "CULBPT_05_11" "CULBPT_05_11" ...
## $ Plot_Source : chr [1:605] "2K17-7724" "2K9-8584" "2K17-7724" "2K9-8584" ...
## $ Class : Factor w/ 5 levels "Cultivated Processing",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Origin : chr [1:605] "USA" "USA" "USA" "USA" ...
## $ Provence : chr [1:605] "NY" "NY" "NY" "NY" ...
## $ Blanca_Cluster1 : chr [1:605] "SLL_processing_2" "SLL_processing_2" "SLL_processing_2" "SLL_processing_2" ...
## $ Blanca_Cluster2 : chr [1:605] "SLL_processing_2" "SLL_processing_2" "SLL_processing_2" "SLL_processing_2" ...
## $ Passport_Species : chr [1:605] "SLL" "SLL" "SLL" "SLL" ...
## $ Passport_Classification : chr [1:605] "SLL_processing_NY" "SLL_processing_NY" "SLL_processing_NY" "SLL_processing_NY" ...
## $ Sim_Grouping : chr [1:605] "Arid" "Arid" "Arid" "Arid" ...
## $ Latitude : chr [1:605] "40.712800000000001" "40.712800000000001" "40.712800000000001" "40.712800000000001" ...
## $ Longitude : chr [1:605] "-74.006" "-74.006" "-74.006" "-74.006" ...
## $ Dehydrotomatidine : num [1:605] 0 0 0.1357 0.0543 0.1395 ...
## $ Tomatidine : num [1:605] 0 0.169 0.681 0.497 0.554 ...
## $ Dehydrotomatine1 : num [1:605] 5.73 0 5.07 19.42 0 ...
## $ Dehydrotomatine2 : num [1:605] 0.35 0 0 0 0 ...
## $ TotalDehydrotomatine : num [1:605] 6.08 0 5.07 19.42 0 ...
## $ Tomatine : num [1:605] 172.7 55.5 123.9 239 64.3 ...
## $ Hydroxytomatine1 : num [1:605] 1.079 0 0 0 0.879 ...
## $ Hydroxytomatine2 : num [1:605] 86.7 53.3 50.9 36 39.9 ...
## $ Hydroxytomatine3 : num [1:605] 17.83 13.63 6.5 8.56 7.23 ...
## $ Hydroxytomatine4 : num [1:605] 9.14 4.84 1.37 7.48 3.02 ...
## $ TotalHydroxytomatine : num [1:605] 114.8 71.8 58.8 52.1 51 ...
## $ Acetoxytomatine1 : num [1:605] 18.9 3.56 3.93 3.34 0 ...
## $ Acetoxytomatine2 : num [1:605] 56.31 4.11 4.12 16.42 3.13 ...
## $ Acetoxytomatine3 : num [1:605] 1.89 0 0.623 1.057 0 ...
## $ TotalAcetoxytomatine : num [1:605] 77.1 7.66 8.68 20.81 3.13 ...
## $ DehydrolycoperosideFGdehydroesculeosideA: num [1:605] 5.13 2.91 2.19 0 0 ...
## $ LycoperosideFGEsculeosideA1 : num [1:605] 10.28 5.55 5.1 0 4.05 ...
## $ LycoperosideFGEsculeosideA2 : num [1:605] 337 200 259 203 300 ...
## $ TotalLycoperosideFGEsculeosideA : num [1:605] 347 205 264 203 304 ...
## $ EsculeosideB1 : num [1:605] 3.79 8.98 4.05 1.68 10.15 ...
## $ EsculeosideB2 : num [1:605] 0.924 1.898 0 0 0 ...
## $ EsculeosideB3 : num [1:605] 3.94 6.79 6.75 2.35 4.88 ...
## $ TotalEsculeosideB : num [1:605] 8.66 17.67 10.8 4.03 15.03 ...
## $ Total : num [1:605] 732 361 474 539 438 ...
# select only the columns we want
Alkaloids_raw_trim <- Alkaloids_raw %>%
select(Genotype, Class,
Dehydrotomatidine, Tomatidine, TotalDehydrotomatine, Tomatine,
TotalHydroxytomatine, TotalAcetoxytomatine, DehydrolycoperosideFGdehydroesculeosideA,
TotalLycoperosideFGEsculeosideA, TotalEsculeosideB, Total)
# go from wide to long
Alkaloids_tidy <- Alkaloids_raw_trim %>%
pivot_longer(cols = Dehydrotomatidine:Total,
names_to = "Alkaloid",
values_to = "Concentration")
# check structure again
str(Alkaloids_tidy)
## tibble [6,050 × 4] (S3: tbl_df/tbl/data.frame)
## $ Genotype : chr [1:6050] "CULBPT_05_11" "CULBPT_05_11" "CULBPT_05_11" "CULBPT_05_11" ...
## $ Class : Factor w/ 5 levels "Cultivated Processing",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Alkaloid : chr [1:6050] "Dehydrotomatidine" "Tomatidine" "TotalDehydrotomatine" "Tomatine" ...
## $ Concentration: num [1:6050] 0 0 6.08 172.66 114.78 ...
Re-level Alkaloid so that it is a factor, and goes in pathway order.
unique(Alkaloids_tidy$Alkaloid)
## [1] "Dehydrotomatidine"
## [2] "Tomatidine"
## [3] "TotalDehydrotomatine"
## [4] "Tomatine"
## [5] "TotalHydroxytomatine"
## [6] "TotalAcetoxytomatine"
## [7] "DehydrolycoperosideFGdehydroesculeosideA"
## [8] "TotalLycoperosideFGEsculeosideA"
## [9] "TotalEsculeosideB"
## [10] "Total"
# change alkaloid factors to be in biosynthetic pathway order
Alkaloids_tidy$Alkaloid <- factor(Alkaloids_tidy$Alkaloid,
levels = c("Dehydrotomatidine",
"Tomatidine",
"TotalDehydrotomatine",
"Tomatine",
"TotalHydroxytomatine",
"TotalAcetoxytomatine",
"DehydrolycoperosideFGdehydroesculeosideA",
"TotalLycoperosideFGEsculeosideA",
"TotalEsculeosideB",
"Total"))
# check levels
levels(Alkaloids_tidy$Alkaloid)
## [1] "Dehydrotomatidine"
## [2] "Tomatidine"
## [3] "TotalDehydrotomatine"
## [4] "Tomatine"
## [5] "TotalHydroxytomatine"
## [6] "TotalAcetoxytomatine"
## [7] "DehydrolycoperosideFGdehydroesculeosideA"
## [8] "TotalLycoperosideFGEsculeosideA"
## [9] "TotalEsculeosideB"
## [10] "Total"
# make a list that has all the full names of the alkaloids
alkaloid_labels <- c("Dehydrotomatidine",
"Tomatidine",
"Dehydrotomatine",
"Alpha-Tomatine",
"Hydroxytomatine",
"Acetoxytomatine",
"Dehydrolycoperoside F/G/Dehydroesculeoside A",
"Lycoperoside F/G/Esculeoside A",
"Esculeoside B",
"Total Steroidal Alkaloids")
# tell alkaloid_labels which original label to refer to
names(alkaloid_labels) <- c("Dehydrotomatidine",
"Tomatidine",
"TotalDehydrotomatine",
"Tomatine",
"TotalHydroxytomatine",
"TotalAcetoxytomatine",
"DehydrolycoperosideFGdehydroesculeosideA",
"TotalLycoperosideFGEsculeosideA",
"TotalEsculeosideB",
"Total")
# enabling labeller for Class too
str(Alkaloids_tidy$Class)
## Factor w/ 5 levels "Cultivated Processing",..: 1 1 1 1 1 1 1 1 1 1 ...
class_labels <- c("Cultivated Processing",
"Cultivated Cherry",
"Wide Cross Hybrid",
"Wild Cherry",
expression(italic("S. pimpinellifolium")))
class_labels
## expression("Cultivated Processing", "Cultivated Cherry", "Wide Cross Hybrid",
## "Wild Cherry", italic("S. pimpinellifolium"))
All y-axis on the same range.
Alkaloids_tidy_mg <- Alkaloids_tidy %>%
mutate(Concentration_mg = Concentration/1000)
Alkaloids_Faceted_Boxplot <- Alkaloids_tidy_mg %>%
ggplot(aes(x = Class, y = Concentration_mg, fill = Class)) +
geom_boxplot(aes(x = Class, y = Concentration_mg), alpha = 0.8, outlier.shape = NA) +
geom_jitter(aes(x = Class, y = Concentration_mg, fill = Class),
shape = 21, size = 0.5, alpha = 0.6) +
scale_y_continuous(trans = "log10", labels = scales::number_format()) +
scale_fill_manual(values = c("purple", "blue", "limegreen", "gold", "red2"),
labels = class_labels) +
labs(title = "Steroidal Alkaloid Concentrations in Tomato",
y = "mg/100 g fresh weight") +
theme_classic() +
theme(legend.text.align = 0,
legend.position = "top",
legend.title = element_blank(),
title = element_text(size = 14),
axis.title = element_text(size = 10),
strip.text = element_text(size = 8),
legend.text = element_text(size = 6),
axis.text.x = element_blank(),
axis.title.x = element_blank(),
axis.ticks.x = element_blank(),
axis.text.y = element_text(size = 6),
panel.grid.major.y = element_line(colour = "gray50", size = 0.1, linetype = "dashed")) +
facet_wrap(~Alkaloid, ncol = 2, nrow = 5,
labeller = labeller(Alkaloid = alkaloid_labels)) +
annotation_logticks(sides = "l", size = 0.15)
Alkaloids_Faceted_Boxplot
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Removed 501 rows containing non-finite values (stat_boxplot).
ggsave("Alkaloid_facet_mg_smallerdots_thinnerticks.pdf",
plot = Alkaloids_Faceted_Boxplot,
dpi = 800,
width = 6, height = 9)
All y-axis on the same range, but the y-axis in the right column is now labelled.
Alkaloids_Faceted_Boxplot_bothyaxislabelled <- Alkaloids_tidy_mg %>%
ggplot(aes(x = Class, y = Concentration_mg, fill = Class)) +
geom_boxplot(aes(x = Class, y = Concentration_mg), alpha = 0.8, outlier.shape = NA) +
geom_jitter(aes(x = Class, y = Concentration_mg, fill = Class),
shape = 21, size = 0.5, alpha = 0.6) +
scale_y_continuous(trans = "log10", labels = scales::number_format(),
limits = c(0.00001, 100)) +
scale_fill_manual(values = c("purple", "blue", "limegreen", "gold", "red2"),
labels = class_labels) +
labs(title = "Steroidal Alkaloid Concentrations in Tomato",
y = "mg/100 g fresh weight") +
theme_classic() +
theme(legend.text.align = 0,
legend.position = "top",
legend.title = element_blank(),
title = element_text(size = 14),
axis.title = element_text(size = 10),
strip.text = element_text(size = 8),
legend.text = element_text(size = 6),
axis.text.x = element_blank(),
axis.title.x = element_blank(),
axis.ticks.x = element_blank(),
axis.text.y = element_text(size = 6),
panel.grid.major.y = element_line(colour = "gray50", size = 0.1, linetype = "dashed")) +
facet_wrap(~Alkaloid, ncol = 2, nrow = 5,
labeller = labeller(Alkaloid = alkaloid_labels),
scales = "free_y") +
annotation_logticks(sides = "l", size = 0.15)
Alkaloids_Faceted_Boxplot_bothyaxislabelled
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Removed 506 rows containing non-finite values (stat_boxplot).
## Warning: Removed 5 rows containing missing values (geom_point).
ggsave("Alkaloid_facet_mg_smallerdots_thinnerticks_all_y_labelled.pdf",
plot = Alkaloids_Faceted_Boxplot_bothyaxislabelled,
dpi = 800,
width = 6, height = 9)
Free_y axis (meaning all the y-axis are independent). This is the plot we used in the paper.
Alkaloids_Faceted_Boxplot_free_y <- Alkaloids_tidy_mg %>%
ggplot(aes(x = Class, y = Concentration_mg, fill = Class)) +
geom_boxplot(aes(x = Class, y = Concentration_mg), alpha = 0.8, outlier.shape = NA) +
geom_jitter(aes(x = Class, y = Concentration_mg, fill = Class),
shape = 21, size = 0.5, alpha = 0.6) +
scale_y_continuous(trans = "log10", labels = scales::number_format()) +
scale_fill_manual(values = c("purple", "blue", "limegreen", "gold", "red2"),
labels = class_labels) +
labs(title = "Steroidal Alkaloid Concentrations in Tomato",
y = "mg/100 g fresh weight") +
theme_classic() +
theme(legend.text.align = 0,
legend.position = "top",
legend.title = element_blank(),
title = element_text(size = 14),
axis.title = element_text(size = 10),
strip.text = element_text(size = 8),
legend.text = element_text(size = 6),
axis.text.x = element_blank(),
axis.title.x = element_blank(),
axis.ticks.x = element_blank(),
axis.text.y = element_text(size = 6),
panel.grid.major.y = element_line(colour = "gray50", size = 0.1, linetype = "dashed")) +
facet_wrap(~Alkaloid, ncol = 2, nrow = 5,
labeller = labeller(Alkaloid = alkaloid_labels),
scales = "free_y") +
annotation_logticks(sides = "l", size = 0.15)
Alkaloids_Faceted_Boxplot_free_y
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Transformation introduced infinite values in continuous y-axis
## Warning: Removed 501 rows containing non-finite values (stat_boxplot).
ggsave("Alkaloid_facet_mg_smallerdots_thinnerticks_free_y.pdf",
plot = Alkaloids_Faceted_Boxplot_free_y,
dpi = 800,
width = 6, height = 9)
Alkaloids_LSmeans <- read_excel("SteroidalAlkaloidsSupplementalData.xlsx",
sheet = "LSMeans Diversity Panel")
str(Alkaloids_LSmeans)
## tibble [107 × 37] (S3: tbl_df/tbl/data.frame)
## $ Genotype : chr [1:107] "CULBPT_05_11" "CULBPT_05_15" "CULBPT_05_22" "CULBPT04_1" ...
## $ Plot_Source : chr [1:107] "2K9-8584" "2K9-8622" "2K17-7708-1" "2K9-8566" ...
## $ Species : chr [1:107] "Processing" "Processing" "Processing" "Processing" ...
## $ Class : chr [1:107] "Cultivated Processing" "Cultivated Processing" "Cultivated Processing" "Cultivated Processing" ...
## $ Origin : chr [1:107] "USA" "USA" "USA" "USA" ...
## $ Provence : chr [1:107] "NY" "NY" "NY" "NY" ...
## $ Blanca_Cluster1 : chr [1:107] "SLL_processing_2" "SLL_processing_2" "SLL_processing_2" "SLL_processing_2" ...
## $ Blanca_Cluster2 : chr [1:107] "SLL_processing_2" "SLL_processing_2" "SLL_processing_2" "SLL_processing_2" ...
## $ Passport_Species : chr [1:107] "SLL" "SLL" "SLL" "SLL" ...
## $ Passport_Classification : chr [1:107] "SLL_processing_NY" "SLL_processing_NY" "SLL_processing_NY" "SLL_processing_NY" ...
## $ Sim_Grouping : chr [1:107] "Arid" "Arid" "Arid" "Arid" ...
## $ Dehydrotomatidine : num [1:107] 1.50e-04 -2.72e-05 -6.49e-05 -2.72e-05 -2.72e-05 ...
## $ Tomatidine : num [1:107] 4.35e-03 -1.72e-04 -2.52e-04 1.26e-04 1.59e-05 ...
## $ DehydrotomatineA1 : num [1:107] 0.00722 0.00865 0.00852 -0.00387 0.00995 ...
## $ Dehydrotomatine2 : num [1:107] -1.07e-03 3.13e-17 -8.74e-16 -1.32e-15 6.58e-16 ...
## $ TotalDehydrotomatine : num [1:107] 0.00615 0.00865 0.00852 -0.00387 0.00995 ...
## $ Tomatine : num [1:107] 0.19291 0.28249 0.17552 -0.00614 0.29296 ...
## $ Hydroxytomatine1 : num [1:107] 1.03e-02 6.91e-04 -1.80e-04 1.59e-03 3.34e-15 ...
## $ Hydroxytomatine2 : num [1:107] 0.1597 0.1119 0.0506 0.1059 0.0227 ...
## $ Hydroxytomatine3 : num [1:107] 0.03527 0.02439 0.00409 0.01958 0.00392 ...
## $ Hydroxytomatine4 : num [1:107] 0.0864 0.01893 0.00232 0.00836 0.00883 ...
## $ TotalHydroxytomatine : num [1:107] 0.2918 0.1559 0.0576 0.1355 0.0355 ...
## $ Acetoxytomatine1 : num [1:107] -0.068051 0.003823 0.007824 0.009859 0.000236 ...
## $ Acetoxytomatine2 : num [1:107] -0.12424 0.04674 0.00696 0.00953 0.03954 ...
## $ Acetoxytomatine3 : num [1:107] 0.011748 0.002474 -0.000115 0.000794 0.004179 ...
## $ TotalAcetoxytomatine : num [1:107] -0.1805 0.053 0.0147 0.0202 0.044 ...
## $ DehydrolycoperosideFGdehydroesculeosideA: num [1:107] -0.03699 0.00663 0.00315 0.00494 0.00274 ...
## $ LycoperosideFGEsculeosideA1 : num [1:107] 0.00566 0.01253 0.01507 0.01004 0.01332 ...
## $ LycoperosideFGEsculeosideA2 : num [1:107] -0.169 0.342 0.384 0.347 0.302 ...
## $ TotalLycoperosideFGEsculeosideA : num [1:107] -0.164 0.354 0.399 0.357 0.315 ...
## $ EsculeosideB1 : num [1:107] -0.034068 0.013843 0.000713 0.010083 0.008089 ...
## $ EsculeosideB2 : num [1:107] -0.006171 0.002183 0.000823 0.000643 -0.000357 ...
## $ EsculeosideB3 : num [1:107] -0.03715 0.01393 0.00281 0.0089 0.01 ...
## $ TotalEsculeosideB : num [1:107] -0.07739 0.02996 0.00435 0.01963 0.01774 ...
## $ Total : num [1:107] 0.0366 0.8908 0.6618 0.527 0.718 ...
## $ Latitude : chr [1:107] "40.712800000000001" "40.712800000000001" "40.712800000000001" "40.712800000000001" ...
## $ Longitude : chr [1:107] "-74.006" "-74.006" "-74.006" "-74.006" ...
Select only the data we will use for our PCA. This includes the alkaloid totals (vs each individual isomer, which is listed), and removing some of the meta-data that we don’t need to complicate our lives right now.
Alkaloids_LSmeans_forPCA <- Alkaloids_LSmeans %>%
select(Genotype, Class,
Dehydrotomatidine, Tomatidine,
TotalDehydrotomatine, Tomatine,
TotalHydroxytomatine, TotalAcetoxytomatine,
DehydrolycoperosideFGdehydroesculeosideA, TotalLycoperosideFGEsculeosideA,
TotalEsculeosideB, Total)
We are running PCA using the package FactoMineR, and doing a quick visualization with fviz_pca from FactoExtra.
quali.sup gives the indexes of the qualitative/categorical variables, in this case, Genotype and Class, which aren’t inputs to the PCA. scale.unit is set to TRUE because we want to scale data to unit variance. scale.unit = TRUE is the default.
# run PCA
Alkaloids_PCA <- PCA(Alkaloids_LSmeans_forPCA,
quali.sup = 1:2,
graph = FALSE,
scale.unit = TRUE)
# visualize the PCA and loadings plot really quickly
fviz_pca(Alkaloids_PCA)
# visualize the PCA scores plot quickly
fviz_pca_ind(Alkaloids_PCA)
This PCA scores plot isn’t too useful for us because we don’t know what point is what (they are just ordered as in our df) but we can fix this in a minute.
# visualize the PCA loadings plot quickly
fviz_pca_var(Alkaloids_PCA)
# get a scree plot
fviz_eig(Alkaloids_PCA)
These default plots would benefit from plotting with ggplot2 so that:
Class affect scores plot locationsGet coordinates for scores plot (where each point is an individual, i.e., a tomato accession). Then bind back to relevant meta-data.
# get scores coordinates
scores_coordinates <- as.data.frame(Alkaloids_PCA$ind$coord)
# check structure
str(scores_coordinates)
## 'data.frame': 107 obs. of 5 variables:
## $ Dim.1: num -1.52 -1.51 -1.56 -1.55 -1.53 ...
## $ Dim.2: num -1.175 -0.919 -0.947 -0.91 -0.944 ...
## $ Dim.3: num -0.00635 -0.06525 -0.06608 -0.08204 -0.04377 ...
## $ Dim.4: num 0.3222 -0.0875 -0.1571 -0.0705 -0.0891 ...
## $ Dim.5: num 0.08121 0.03031 0.03351 0.05099 0.00653 ...
# bind back to meta-data
Alkaloids_LSmeans_withPC <- bind_cols(Alkaloids_LSmeans, scores_coordinates)
Now the first 5 dimensions (Dim.1 through Dim.5) are at the end of our df.
Get coordinates for loadings plot (where each point is a variable, i.e., a alkaloid). Then bind back to indicate which alkaloid is which set of coordinates.
loadings_coordinates <- as.data.frame(Alkaloids_PCA$var$coord)
str(loadings_coordinates)
## 'data.frame': 10 obs. of 5 variables:
## $ Dim.1: num 0.291 0.554 0.758 0.586 0.558 ...
## $ Dim.2: num 0.0929 -0.2268 -0.5233 -0.5008 -0.1302 ...
## $ Dim.3: num 0.082 0.538 0.269 0.528 -0.52 ...
## $ Dim.4: num 0.92 0.13 -0.164 -0.135 0.151 ...
## $ Dim.5: num -0.214 0.375 -0.132 -0.127 0.548 ...
loadings_coordinates$Alkaloid <- c("Dehydrotomatidine",
"Tomatidine",
"TotalDehydrotomatine",
"Tomatine",
"TotalHydroxytomatine",
"TotalAcetoxytomatine",
"DehydrolycoperosideFGdehydroesculeosideA",
"TotalLycoperosideFGEsculeosideA",
"TotalEsculeosideB",
"Total")
str(loadings_coordinates)
## 'data.frame': 10 obs. of 6 variables:
## $ Dim.1 : num 0.291 0.554 0.758 0.586 0.558 ...
## $ Dim.2 : num 0.0929 -0.2268 -0.5233 -0.5008 -0.1302 ...
## $ Dim.3 : num 0.082 0.538 0.269 0.528 -0.52 ...
## $ Dim.4 : num 0.92 0.13 -0.164 -0.135 0.151 ...
## $ Dim.5 : num -0.214 0.375 -0.132 -0.127 0.548 ...
## $ Alkaloid: chr "Dehydrotomatidine" "Tomatidine" "TotalDehydrotomatine" "Tomatine" ...
Set Class as a factor with levels going from more cultivated, to more wild, in the order specified below.
Alkaloids_LSmeans_withPC$Class <- factor(Alkaloids_LSmeans_withPC$Class,
levels = c("Cultivated Processing",
"Cultivated Cherry",
"Wide Cross Hybrid",
"Wild Cherry",
"S. pimpinellifolium"))
Alkaloids_PCA_scores <- Alkaloids_LSmeans_withPC %>%
ggplot(aes(x = Dim.1, y = Dim.2, fill = Class, shape = Class)) +
geom_hline(yintercept = 0, linetype = "dashed", color = "black", alpha = 0.6) +
geom_vline(xintercept = 0, linetype = "dashed", color = "black", alpha = 0.6) +
geom_point(size = 2.5, color = "black", alpha = 0.8) +
scale_shape_manual(values= c(24, 22, 23, 22, 21),
labels = class_labels) +
scale_fill_manual(values = c("purple", "blue", "limegreen", "gold", "red2"),
labels = class_labels) +
xlim(-2, 6) +
ylim(-5, 6) +
theme_classic() +
theme(text = element_text(size = 12),
axis.title = element_text(size = 12),
axis.text = element_text(size = 12),
legend.text.align = 0) +
labs(x = "PC1: 32.2%",
y = "PC2: 30.0%")
Alkaloids_PCA_scores
ggsave(filename = "PCA_scores.png",
plot = Alkaloids_PCA_scores,
dpi = 1200,
width = 9,
height = 6)
Alkaloids_PCA_loadings <- loadings_coordinates %>%
ggplot(aes(x = Dim.1, y = Dim.2, label = Alkaloid)) +
geom_hline(yintercept = 0, linetype = "dashed", color = "black", alpha = 0.6) +
geom_vline(xintercept = 0, linetype = "dashed", color = "black", alpha = 0.6) +
geom_point(size = 2.5, color = "black", alpha = 0.8) +
geom_text_repel(aes(label = alkaloid_labels)) +
xlim(-0.33,1.1) +
ylim(-0.8, 1) +
theme_classic() +
theme(text = element_text(size = 12),
axis.title = element_text(size = 12),
axis.text = element_text(size = 12),
legend.text.align = 0) +
labs(x = "PC1: 32.2%",
y = "PC2: 30.0%")
Alkaloids_PCA_loadings
ggsave(filename = "PCA_loadings.png",
plot = Alkaloids_PCA_loadings,
dpi = 1200,
width = 9,
height = 6)
Make one plot of the PCA scores and loadings with the package patchwork
scores_and_loadings <- Alkaloids_PCA_scores + Alkaloids_PCA_loadings
scores_and_loadings + plot_annotation(tag_levels = "A")
scores_and_loadings <- scores_and_loadings + plot_annotation(tag_levels = "A")
ggsave(filename = "PCA_scores_and_loadings.png",
plot = scores_and_loadings,
dpi = 1200,
width = 14,
height = 6)
Data is already read in from the PCA section
glimpse(Alkaloids_LSmeans)
## Rows: 107
## Columns: 37
## $ Genotype <chr> "CULBPT_05_11", "CULBPT_05_1…
## $ Plot_Source <chr> "2K9-8584", "2K9-8622", "2K1…
## $ Species <chr> "Processing", "Processing", …
## $ Class <chr> "Cultivated Processing", "Cu…
## $ Origin <chr> "USA", "USA", "USA", "USA", …
## $ Provence <chr> "NY", "NY", "NY", "NY", "CA"…
## $ Blanca_Cluster1 <chr> "SLL_processing_2", "SLL_pro…
## $ Blanca_Cluster2 <chr> "SLL_processing_2", "SLL_pro…
## $ Passport_Species <chr> "SLL", "SLL", "SLL", "SLL", …
## $ Passport_Classification <chr> "SLL_processing_NY", "SLL_pr…
## $ Sim_Grouping <chr> "Arid", "Arid", "Arid", "Ari…
## $ Dehydrotomatidine <dbl> 0.000150413, -0.000027200, -…
## $ Tomatidine <dbl> 0.004349490, -0.000171592, -…
## $ DehydrotomatineA1 <dbl> 0.007224074, 0.008654740, 0.…
## $ Dehydrotomatine2 <dbl> -1.073759e-03, 3.130000e-17,…
## $ TotalDehydrotomatine <dbl> 0.006150316, 0.008654740, 0.…
## $ Tomatine <dbl> 0.192910562, 0.282492643, 0.…
## $ Hydroxytomatine1 <dbl> 1.025210e-02, 6.909610e-04, …
## $ Hydroxytomatine2 <dbl> 0.15965655, 0.11188176, 0.05…
## $ Hydroxytomatine3 <dbl> 0.035266551, 0.024394953, 0.…
## $ Hydroxytomatine4 <dbl> 0.086404221, 0.018934456, 0.…
## $ TotalHydroxytomatine <dbl> 0.29179623, 0.15590213, 0.05…
## $ Acetoxytomatine1 <dbl> -0.068050846, 0.003823208, 0…
## $ Acetoxytomatine2 <dbl> -0.124244790, 0.046737984, 0…
## $ Acetoxytomatine3 <dbl> 0.011748097, 0.002473732, -0…
## $ TotalAcetoxytomatine <dbl> -0.180547540, 0.053034924, 0…
## $ DehydrolycoperosideFGdehydroesculeosideA <dbl> -0.036985596, 0.006625065, 0…
## $ LycoperosideFGEsculeosideA1 <dbl> 0.005657292, 0.012533403, 0.…
## $ LycoperosideFGEsculeosideA2 <dbl> -0.1693034, 0.3417664, 0.384…
## $ TotalLycoperosideFGEsculeosideA <dbl> -0.1636461, 0.3542998, 0.399…
## $ EsculeosideB1 <dbl> -0.034068491, 0.013842904, 0…
## $ EsculeosideB2 <dbl> -0.006171348, 0.002183259, 0…
## $ EsculeosideB3 <dbl> -0.037154338, 0.013930950, 0…
## $ TotalEsculeosideB <dbl> -0.077394178, 0.029957114, 0…
## $ Total <dbl> 0.03656481, 0.89076768, 0.66…
## $ Latitude <chr> "40.712800000000001", "40.71…
## $ Longitude <chr> "-74.006", "-74.006", "-74.0…
# we can use this df for HCA also with some trimming
glimpse(Alkaloids_LSmeans_forPCA)
## Rows: 107
## Columns: 12
## $ Genotype <chr> "CULBPT_05_11", "CULBPT_05_1…
## $ Class <chr> "Cultivated Processing", "Cu…
## $ Dehydrotomatidine <dbl> 0.000150413, -0.000027200, -…
## $ Tomatidine <dbl> 0.004349490, -0.000171592, -…
## $ TotalDehydrotomatine <dbl> 0.006150316, 0.008654740, 0.…
## $ Tomatine <dbl> 0.192910562, 0.282492643, 0.…
## $ TotalHydroxytomatine <dbl> 0.29179623, 0.15590213, 0.05…
## $ TotalAcetoxytomatine <dbl> -0.180547540, 0.053034924, 0…
## $ DehydrolycoperosideFGdehydroesculeosideA <dbl> -0.036985596, 0.006625065, 0…
## $ TotalLycoperosideFGEsculeosideA <dbl> -0.1636461, 0.3542998, 0.399…
## $ TotalEsculeosideB <dbl> -0.077394178, 0.029957114, 0…
## $ Total <dbl> 0.03656481, 0.89076768, 0.66…
We will move Genotype to a rowname, because in Hierarchical Clustering you can only have your input data (i.e., no meta-data). Having Genotype as a rowname helps recombination with metadata later.
Alkaloids_LSmeans_forHCA <- Alkaloids_LSmeans_forPCA %>%
column_to_rownames(var = "Genotype") %>%
select(-Class)
kable(head(Alkaloids_LSmeans_forHCA))
| Dehydrotomatidine | Tomatidine | TotalDehydrotomatine | Tomatine | TotalHydroxytomatine | TotalAcetoxytomatine | DehydrolycoperosideFGdehydroesculeosideA | TotalLycoperosideFGEsculeosideA | TotalEsculeosideB | Total | |
|---|---|---|---|---|---|---|---|---|---|---|
| CULBPT_05_11 | 0.0001504 | 0.0043495 | 0.0061503 | 0.1929106 | 0.2917962 | -0.1805475 | -0.0369856 | -0.1636462 | -0.0773942 | 0.0365648 |
| CULBPT_05_15 | -0.0000272 | -0.0001716 | 0.0086547 | 0.2824926 | 0.1559021 | 0.0530349 | 0.0066251 | 0.3542998 | 0.0299571 | 0.8907677 |
| CULBPT_05_22 | -0.0000649 | -0.0002516 | 0.0085205 | 0.1755250 | 0.0576202 | 0.0146705 | 0.0031468 | 0.3991363 | 0.0043489 | 0.6618186 |
| CULBPT04_1 | -0.0000272 | 0.0001259 | -0.0038737 | -0.0061446 | 0.1354779 | 0.0201870 | 0.0049377 | 0.3566699 | 0.0196277 | 0.5269806 |
| E6203 | -0.0000272 | 0.0000159 | 0.0099538 | 0.2929606 | 0.0354514 | 0.0439532 | 0.0027439 | 0.3151958 | 0.0177365 | 0.7179839 |
| F06-2041 | -0.0000272 | -0.0001648 | -0.0011236 | 0.0169681 | 0.0188454 | 0.0262002 | 0.0053084 | 0.1696728 | 0.0009943 | 0.2352713 |
colMeans(Alkaloids_LSmeans_forHCA) # calculate means
## Dehydrotomatidine
## 1.688489e-04
## Tomatidine
## 7.210261e-03
## TotalDehydrotomatine
## 1.427984e-01
## Tomatine
## 1.865975e+00
## TotalHydroxytomatine
## 1.323755e+00
## TotalAcetoxytomatine
## 2.880668e+00
## DehydrolycoperosideFGdehydroesculeosideA
## 1.369470e-01
## TotalLycoperosideFGEsculeosideA
## 7.396247e+00
## TotalEsculeosideB
## 4.298819e-01
## Total
## 1.418294e+01
# 2 means by column-wise
apply(Alkaloids_LSmeans_forHCA, 2, sd) # calculate SDs
## Dehydrotomatidine
## 5.046878e-04
## Tomatidine
## 2.409594e-02
## TotalDehydrotomatine
## 3.393789e-01
## Tomatine
## 5.889986e+00
## TotalHydroxytomatine
## 2.918240e+00
## TotalAcetoxytomatine
## 1.164316e+01
## DehydrolycoperosideFGdehydroesculeosideA
## 1.833925e-01
## TotalLycoperosideFGEsculeosideA
## 8.536619e+00
## TotalEsculeosideB
## 5.177968e-01
## Total
## 1.666068e+01
Yes we do need to scale because we do not have means of 0 and SD of 1.
scaled_Alkaloids_LSmeans_forHCA <- scale(Alkaloids_LSmeans_forHCA)
Did the scaling work?
colMeans(scaled_Alkaloids_LSmeans_forHCA) # calculate means, should be 0
## Dehydrotomatidine
## -2.885802e-17
## Tomatidine
## 5.901302e-18
## TotalDehydrotomatine
## -4.889650e-17
## Tomatine
## -1.596108e-17
## TotalHydroxytomatine
## 1.718511e-17
## TotalAcetoxytomatine
## 7.522539e-18
## DehydrolycoperosideFGdehydroesculeosideA
## 5.607858e-17
## TotalLycoperosideFGEsculeosideA
## 1.686086e-18
## TotalEsculeosideB
## -3.372173e-18
## Total
## -6.082881e-17
apply(scaled_Alkaloids_LSmeans_forHCA, 2, sd) # calculate SDs, should be 1
## Dehydrotomatidine
## 1
## Tomatidine
## 1
## TotalDehydrotomatine
## 1
## Tomatine
## 1
## TotalHydroxytomatine
## 1
## TotalAcetoxytomatine
## 1
## DehydrolycoperosideFGdehydroesculeosideA
## 1
## TotalLycoperosideFGEsculeosideA
## 1
## TotalEsculeosideB
## 1
## Total
## 1
Yes scaling worked. Now we can continue.
# calculate the distance matrix (euclidean distance)
dist_matrix <- dist(scaled_Alkaloids_LSmeans_forHCA)
# conduct hierarchical clustering
alkaloid_hclust <- hclust(d = dist_matrix, method = "ward.D2")
summary(alkaloid_hclust)
## Length Class Mode
## merge 212 -none- numeric
## height 106 -none- numeric
## order 107 -none- numeric
## labels 107 -none- character
## method 1 -none- character
## call 3 -none- call
## dist.method 1 -none- character
alkaloid_hclustMake a quick and dirty plot of our hierarchical clustering, will make look nicer later.
hclust_ward2 <- plot(alkaloid_hclust,
main = "HCA of Accessions by Steroidal Alkaloid Profile")
You apply dendro_data() on a HCA object, here alkaloid_hclust
# extract data for dendrogram. can use rectangle or triangle
dend_data <- dendro_data(alkaloid_hclust, type = "rectangle")
# what are the names in dend_data
names(dend_data)
## [1] "segments" "labels" "leaf_labels" "class"
# ggplot dendrogram from hclust
ggdendrogram(alkaloid_hclust)
# line segments
head(dend_data$segments)
## x y xend yend
## 1 31.59991 24.77930 4.90625 24.77930
## 2 4.90625 24.77930 4.90625 16.95778
## 3 4.90625 16.95778 2.25000 16.95778
## 4 2.25000 16.95778 2.25000 10.14739
## 5 2.25000 10.14739 1.00000 10.14739
## 6 1.00000 10.14739 1.00000 0.00000
# labels
head(dend_data$labels)
## x y label
## 1 1 0 LA2308
## 2 2 0 LA2256
## 3 3 0 LA2262
## 4 4 0 LA1654
## 5 5 0 LA2213
## 6 6 0 LA1338
# make vector with the end label order
end_label_order <- dend_data$labels$label
# make df with end_label_order and an id for order
# rename end_label_order to be Genotype to enable joining
end_label_order_withid <- as.data.frame(end_label_order) %>%
mutate(hclust_end_order = row_number()) %>%
rename(Genotype = end_label_order)
# convert rowname to column in scaled HCA data to enable joining
scaled_Alkaloids_LSmeans_forHCA_genotype <-
as.data.frame(scaled_Alkaloids_LSmeans_forHCA) %>%
rownames_to_column(var = "Genotype")
class(scaled_Alkaloids_LSmeans_forHCA_genotype)
## [1] "data.frame"
class(end_label_order_withid)
## [1] "data.frame"
# join with meta-data by
Alkaloids_LSmeans_forHCA_endlabelorder_fordend <-
left_join(Alkaloids_LSmeans_withPC,
end_label_order_withid,
by = "Genotype")
kable(head(Alkaloids_LSmeans_forHCA_endlabelorder_fordend))
| Genotype | Plot_Source | Species | Class | Origin | Provence | Blanca_Cluster1 | Blanca_Cluster2 | Passport_Species | Passport_Classification | Sim_Grouping | Dehydrotomatidine | Tomatidine | DehydrotomatineA1 | Dehydrotomatine2 | TotalDehydrotomatine | Tomatine | Hydroxytomatine1 | Hydroxytomatine2 | Hydroxytomatine3 | Hydroxytomatine4 | TotalHydroxytomatine | Acetoxytomatine1 | Acetoxytomatine2 | Acetoxytomatine3 | TotalAcetoxytomatine | DehydrolycoperosideFGdehydroesculeosideA | LycoperosideFGEsculeosideA1 | LycoperosideFGEsculeosideA2 | TotalLycoperosideFGEsculeosideA | EsculeosideB1 | EsculeosideB2 | EsculeosideB3 | TotalEsculeosideB | Total | Latitude | Longitude | Dim.1 | Dim.2 | Dim.3 | Dim.4 | Dim.5 | hclust_end_order |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| CULBPT_05_11 | 2K9-8584 | Processing | Cultivated Processing | USA | NY | SLL_processing_2 | SLL_processing_2 | SLL | SLL_processing_NY | Arid | 0.0001504 | 0.0043495 | 0.0072241 | -0.0010738 | 0.0061503 | 0.1929106 | 0.0102521 | 0.1596566 | 0.0352666 | 0.0864042 | 0.2917962 | -0.0680508 | -0.1242448 | 0.0117481 | -0.1805475 | -0.0369856 | 0.0056573 | -0.1693034 | -0.1636462 | -0.0340685 | -0.0061713 | -0.0371543 | -0.0773942 | 0.0365648 | 40.712800000000001 | -74.006 | -1.520106 | -1.1749543 | -0.0063469 | 0.3222487 | 0.0812080 | 74 |
| CULBPT_05_15 | 2K9-8622 | Processing | Cultivated Processing | USA | NY | SLL_processing_2 | SLL_processing_2 | SLL | SLL_processing_NY | Arid | -0.0000272 | -0.0001716 | 0.0086547 | 0.0000000 | 0.0086547 | 0.2824926 | 0.0006910 | 0.1118818 | 0.0243950 | 0.0189345 | 0.1559021 | 0.0038232 | 0.0467380 | 0.0024737 | 0.0530349 | 0.0066251 | 0.0125334 | 0.3417664 | 0.3542998 | 0.0138429 | 0.0021833 | 0.0139310 | 0.0299571 | 0.8907677 | 40.712800000000001 | -74.006 | -1.506328 | -0.9192283 | -0.0652522 | -0.0874636 | 0.0303111 | 45 |
| CULBPT_05_22 | 2K17-7708-1 | Processing | Cultivated Processing | USA | NY | SLL_processing_2 | SLL_processing_2 | SLL | SLL_processing_NY | Arid | -0.0000649 | -0.0002516 | 0.0085205 | 0.0000000 | 0.0085205 | 0.1755250 | -0.0001804 | 0.0505547 | 0.0040900 | 0.0023229 | 0.0576202 | 0.0078240 | 0.0069610 | -0.0001145 | 0.0146705 | 0.0031468 | 0.0150674 | 0.3840689 | 0.3991363 | 0.0007128 | 0.0008227 | 0.0028133 | 0.0043489 | 0.6618186 | 40.712800000000001 | -74.006 | -1.556597 | -0.9465169 | -0.0660847 | -0.1571217 | 0.0335051 | 47 |
| CULBPT04_1 | 2K9-8566 | Processing | Cultivated Processing | USA | NY | SLL_processing_2 | SLL_processing_2 | SLL | SLL_processing_NY | Arid | -0.0000272 | 0.0001259 | -0.0038737 | 0.0000000 | -0.0038737 | -0.0061446 | 0.0015930 | 0.1059454 | 0.0195829 | 0.0083566 | 0.1354779 | 0.0098585 | 0.0095344 | 0.0007941 | 0.0201870 | 0.0049377 | 0.0100416 | 0.3466282 | 0.3566699 | 0.0100830 | 0.0006432 | 0.0089015 | 0.0196277 | 0.5269806 | 40.712800000000001 | -74.006 | -1.554353 | -0.9098403 | -0.0820367 | -0.0704848 | 0.0509933 | 51 |
| E6203 | 2K9-8600 | Processing | Cultivated Processing | USA | CA | SLL_processing_1 | SLL_processing_1_1 | SLL | SLL_processing_CA | Arid | -0.0000272 | 0.0000159 | 0.0099538 | 0.0000000 | 0.0099538 | 0.2929606 | 0.0000000 | 0.0227075 | 0.0039160 | 0.0088279 | 0.0354514 | 0.0002365 | 0.0395374 | 0.0041794 | 0.0439532 | 0.0027439 | 0.0133225 | 0.3018732 | 0.3151958 | 0.0080894 | -0.0003574 | 0.0100045 | 0.0177365 | 0.7179839 | 36.778300000000002 | -119.4179 | -1.530189 | -0.9439456 | -0.0437656 | -0.0891376 | 0.0065314 | 43 |
| F06-2041 | 2K16-9843 | Processing | Cultivated Processing | USA | OH | SLL_processing_1 | SLL_processing_1_3 | SLL | SLL_processing_OH | Humid | -0.0000272 | -0.0001648 | -0.0011236 | 0.0000000 | -0.0011236 | 0.0169681 | 0.0011237 | 0.0195573 | -0.0016308 | -0.0016069 | 0.0188454 | -0.0004237 | 0.0271524 | -0.0005286 | 0.0262002 | 0.0053084 | 0.0049033 | 0.1647694 | 0.1696728 | -0.0006298 | -0.0003074 | 0.0019315 | 0.0009943 | 0.2352713 | 40.417299999999997 | -82.9071 | -1.585830 | -0.9382978 | -0.0679953 | -0.0773861 | 0.0191808 | 49 |
# arrange by end label order
order_for_Genotype_endlabels <-
Alkaloids_LSmeans_forHCA_endlabelorder_fordend %>%
arrange(hclust_end_order)
order_for_Genotype_endlabels$Class <- factor(order_for_Genotype_endlabels$Class,
levels = c("Cultivated Processing",
"Cultivated Cherry",
"Wide Cross Hybrid",
"Wild Cherry",
"S. pimpinellifolium"))
HCA_tomato_alkaloids_wardD2 <- dend_data$segments %>%
ggplot(aes(x = x, y = y)) +
geom_segment(aes(xend = xend, yend = yend)) +
geom_text(data = dend_data$labels,
aes(x, y, label = order_for_Genotype_endlabels$Genotype,
color = order_for_Genotype_endlabels$Class),
hjust = 1, angle = 90, size = 2.5) +
scale_color_manual(values = c("purple", "blue", "limegreen", "gold", "red2")) +
ylim(-5, 25) +
theme_minimal() +
theme(axis.title.x = element_blank(),
axis.text.x = element_blank(),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
labs(title = "Dendrogram from Hierarhical Clustering of Tomato Steroidal Alkaloids",
subtitle = "Ward's D2 Linkage Distances",
x = "",
y = "Height",
color = "Class")
HCA_tomato_alkaloids_wardD2
Selected based on major clusters of the dendrogram above.
cut3.alkaloid_hclust <- cutree(alkaloid_hclust, k = 3)
hclust_3_group <- cut3.alkaloid_hclust
Alkaloids_LSmeans_forHCA_endlabelorder_fordend_withclust <- Alkaloids_LSmeans_forHCA_endlabelorder_fordend %>%
mutate(hclust_3_cluster = as.factor(hclust_3_group))
glimpse(Alkaloids_LSmeans_forHCA_endlabelorder_fordend_withclust)
## Rows: 107
## Columns: 44
## $ Genotype <chr> "CULBPT_05_11", "CULBPT_05_1…
## $ Plot_Source <chr> "2K9-8584", "2K9-8622", "2K1…
## $ Species <chr> "Processing", "Processing", …
## $ Class <fct> Cultivated Processing, Culti…
## $ Origin <chr> "USA", "USA", "USA", "USA", …
## $ Provence <chr> "NY", "NY", "NY", "NY", "CA"…
## $ Blanca_Cluster1 <chr> "SLL_processing_2", "SLL_pro…
## $ Blanca_Cluster2 <chr> "SLL_processing_2", "SLL_pro…
## $ Passport_Species <chr> "SLL", "SLL", "SLL", "SLL", …
## $ Passport_Classification <chr> "SLL_processing_NY", "SLL_pr…
## $ Sim_Grouping <chr> "Arid", "Arid", "Arid", "Ari…
## $ Dehydrotomatidine <dbl> 0.000150413, -0.000027200, -…
## $ Tomatidine <dbl> 0.004349490, -0.000171592, -…
## $ DehydrotomatineA1 <dbl> 0.007224074, 0.008654740, 0.…
## $ Dehydrotomatine2 <dbl> -1.073759e-03, 3.130000e-17,…
## $ TotalDehydrotomatine <dbl> 0.006150316, 0.008654740, 0.…
## $ Tomatine <dbl> 0.192910562, 0.282492643, 0.…
## $ Hydroxytomatine1 <dbl> 1.025210e-02, 6.909610e-04, …
## $ Hydroxytomatine2 <dbl> 0.15965655, 0.11188176, 0.05…
## $ Hydroxytomatine3 <dbl> 0.035266551, 0.024394953, 0.…
## $ Hydroxytomatine4 <dbl> 0.086404221, 0.018934456, 0.…
## $ TotalHydroxytomatine <dbl> 0.29179623, 0.15590213, 0.05…
## $ Acetoxytomatine1 <dbl> -0.068050846, 0.003823208, 0…
## $ Acetoxytomatine2 <dbl> -0.124244790, 0.046737984, 0…
## $ Acetoxytomatine3 <dbl> 0.011748097, 0.002473732, -0…
## $ TotalAcetoxytomatine <dbl> -0.180547540, 0.053034924, 0…
## $ DehydrolycoperosideFGdehydroesculeosideA <dbl> -0.036985596, 0.006625065, 0…
## $ LycoperosideFGEsculeosideA1 <dbl> 0.005657292, 0.012533403, 0.…
## $ LycoperosideFGEsculeosideA2 <dbl> -0.1693034, 0.3417664, 0.384…
## $ TotalLycoperosideFGEsculeosideA <dbl> -0.1636461, 0.3542998, 0.399…
## $ EsculeosideB1 <dbl> -0.034068491, 0.013842904, 0…
## $ EsculeosideB2 <dbl> -0.006171348, 0.002183259, 0…
## $ EsculeosideB3 <dbl> -0.037154338, 0.013930950, 0…
## $ TotalEsculeosideB <dbl> -0.077394178, 0.029957114, 0…
## $ Total <dbl> 0.03656481, 0.89076768, 0.66…
## $ Latitude <chr> "40.712800000000001", "40.71…
## $ Longitude <chr> "-74.006", "-74.006", "-74.0…
## $ Dim.1 <dbl> -1.5201064, -1.5063278, -1.5…
## $ Dim.2 <dbl> -1.17495432, -0.91922826, -0…
## $ Dim.3 <dbl> -0.006346942, -0.065252226, …
## $ Dim.4 <dbl> 0.32224868, -0.08746361, -0.…
## $ Dim.5 <dbl> 0.081207963, 0.030311083, 0.…
## $ hclust_end_order <int> 74, 45, 47, 51, 43, 49, 50, …
## $ hclust_3_cluster <fct> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1…
We have made this plot already in the PCA section of this Rmd.
Alkaloids_LSmeans_forHCA_endlabelorder_fordend_withclust$Class <-
factor(Alkaloids_LSmeans_forHCA_endlabelorder_fordend_withclust$Class,
levels = c("Cultivated Processing",
"Cultivated Cherry",
"Wide Cross Hybrid",
"Wild Cherry",
"S. pimpinellifolium"))
Alkaloids_LSmeans_forHCA_endlabelorder_fordend_withclust %>%
ggplot(aes(x = Dim.1, y = Dim.2, fill = Class, shape = Class)) +
geom_point(size = 2, alpha = 0.8) +
geom_hline(yintercept = 0, linetype = "dashed", color = "black", alpha = 0.6) +
geom_vline(xintercept = 0, linetype = "dashed", color = "black", alpha = 0.6) +
scale_shape_manual(values=c(24,22,23,22,21),
labels = expression("Cultivated Processing",
"Cultivated Cherry",
"Wide Cross Hybrid",
"Wild Cherry", italic("S. pimpinellifolium"))) +
scale_fill_manual(values = c("purple", "blue", "limegreen", "gold", "red2"),
labels = expression("Cultivated Processing",
"Cultivated Cherry",
"Wide Cross Hybrid",
"Wild Cherry",
italic("S. pimpinellifolium"))) +
theme_classic() +
theme(text = element_text(size = 12),
axis.title = element_text(size = 12),
axis.text = element_text(size = 12),
legend.text.align = 0) +
labs(title = "PCA Scores Plot",
x = "PC1: 32.2%",
y = "PC2: 30.0%")
Labeling points with their genotype.
alkaloid_pca <- Alkaloids_LSmeans_forHCA_endlabelorder_fordend_withclust %>%
ggplot(aes(x = Dim.1, y = Dim.2, fill = Class, shape = Class, label = Genotype)) +
geom_point() +
geom_text(nudge_x = 0.8, nudge_y = 0.1) +
scale_shape_manual(values=c(24,22,23,22,21)) +
scale_fill_manual(values = c("purple", "blue", "limegreen", "gold", "red2")) +
theme_classic() +
theme(text = element_text(size = 12),
axis.title = element_text(size = 12),
axis.text = element_text(size = 12)) +
labs(title = "",
x = "PC1: 32.2%",
y = "PC2: 30.0%")
alkaloid_pca
A disaster. Using ggrepel doesn’t work super well here either because there is so much bunching of points.
Let’s try using plotly.
alkaloid_pca <- Alkaloids_LSmeans_forHCA_endlabelorder_fordend_withclust %>%
ggplot(aes(x = Dim.1, y = Dim.2,
fill = Class, shape = Class, label = Genotype, text = Genotype)) +
geom_point(size = 2, alpha = 0.8) +
scale_shape_manual(values=c(24,22,23,22,21)) +
scale_fill_manual(values = c("purple", "blue", "limegreen", "gold", "red2")) +
theme_classic() +
theme(text = element_text(size = 12),
axis.title = element_text(size = 12),
axis.text = element_text(size = 12)) +
labs(title = "PCA Scores Plot",
x = "PC1: 32.2%",
y = "PC2: 30.0%")
ggplotly(alkaloid_pca, tooltip = "text")
Alkaloids_LSmeans_forHCA_endlabelorder_fordend_withclust %>%
ggplot(aes(x = Dim.1, y = Dim.2, fill = hclust_3_cluster, shape = Class)) +
geom_point(size = 2, alpha = 0.8) +
geom_hline(yintercept = 0, linetype = "dashed", color = "black", alpha = 0.6) +
geom_vline(xintercept = 0, linetype = "dashed", color = "black", alpha = 0.6) +
scale_shape_manual(values=c(24,22,23,22,21),
labels = expression("Cultivated Processing",
"Cultivated Cherry",
"Wide Cross Hybrid",
"Wild Cherry",
italic("S. pimpinellifolium"))) +
scale_fill_viridis_d() +
theme_classic() +
theme(text = element_text(size = 12),
axis.title = element_text(size = 12),
axis.text = element_text(size = 12),
legend.text.align = 0) +
labs(title = "PCA Scores Plot",
subtitle = "Overlaid with Hierarchical Cluster Assignment (3 clusters)",
x = "PC1: 32.2%",
y = "PC2: 30.0%")
Remove all other accessions that do not belong to the class wild cherry.
Alkaloids_LSmeans_forHCA_endlabelorder_fordend_withclust_wildcherry <-
Alkaloids_LSmeans_forHCA_endlabelorder_fordend_withclust %>%
filter(Class == "Wild Cherry")
Alkaloids_LSmeans_forHCA_endlabelorder_fordend_withclust_wildcherry %>%
ggplot(aes(x = Dim.1, y = Dim.2, fill = Class, shape = Class)) +
geom_point(size = 2.5, alpha = 0.8) +
geom_hline(yintercept = 0, linetype = "dashed", color = "black", alpha = 0.6) +
geom_vline(xintercept = 0, linetype = "dashed", color = "black", alpha = 0.6) +
scale_shape_manual(values=22) +
scale_fill_manual(values = "gold") +
theme_classic() +
theme(text = element_text(size = 12),
axis.title = element_text(size = 12),
axis.text = element_text(size = 12),
legend.text.align = 0) +
labs(title = "",
x = "PC1: 32.2%",
y = "PC2: 30.0%") +
theme(legend.position="right")
glimpse(Alkaloids_LSmeans_forHCA_endlabelorder_fordend_withclust_wildcherry)
## Rows: 31
## Columns: 44
## $ Genotype <chr> "LA1314", "LA1338", "LA1464"…
## $ Plot_Source <chr> "SG13-403x", "SG13-404x", "S…
## $ Species <chr> "Wild Cherry", "Wild Cherry"…
## $ Class <fct> Wild Cherry, Wild Cherry, Wi…
## $ Origin <chr> "Peru", "Ecuador", "Honduras…
## $ Provence <chr> "Cusco", "Napo", "Unknown", …
## $ Blanca_Cluster1 <chr> "SLC_Peru", "SLC_Ecuador", "…
## $ Blanca_Cluster2 <chr> "SLC_Peru_3", "SLC_Ecuador_1…
## $ Passport_Species <chr> "SLC", "SLC", "SLC", "SLC", …
## $ Passport_Classification <chr> "SLC_Peru_I3", "SLC", "SLC_M…
## $ Sim_Grouping <chr> "Not_Classified", "Not_Class…
## $ Dehydrotomatidine <dbl> 0.000094700, 0.000755740, 0.…
## $ Tomatidine <dbl> 0.002853565, 0.029799904, 0.…
## $ DehydrotomatineA1 <dbl> 0.11314257, 0.18169144, 0.21…
## $ Dehydrotomatine2 <dbl> 2.116532e-03, 1.231448e-03, …
## $ TotalDehydrotomatine <dbl> 0.11525910, 0.18292289, 0.22…
## $ Tomatine <dbl> 1.04216262, 2.01065486, 1.93…
## $ Hydroxytomatine1 <dbl> 4.714502e-02, 9.745796e-01, …
## $ Hydroxytomatine2 <dbl> 0.9868761, 1.7829255, 1.5262…
## $ Hydroxytomatine3 <dbl> 0.15099070, 19.57380644, 0.5…
## $ Hydroxytomatine4 <dbl> 0.18403370, 3.37755866, 1.00…
## $ TotalHydroxytomatine <dbl> 1.3690455, 25.7088702, 3.184…
## $ Acetoxytomatine1 <dbl> 0.211834825, -0.003449198, 0…
## $ Acetoxytomatine2 <dbl> 0.337686456, -0.002722664, 0…
## $ Acetoxytomatine3 <dbl> 0.074216019, -0.000528550, 0…
## $ TotalAcetoxytomatine <dbl> 0.623737300, -0.006700412, 0…
## $ DehydrolycoperosideFGdehydroesculeosideA <dbl> 0.121574301, -0.001452750, 0…
## $ LycoperosideFGEsculeosideA1 <dbl> 0.660210064, -0.002774051, 1…
## $ LycoperosideFGEsculeosideA2 <dbl> 8.473063024, -0.200172079, 1…
## $ TotalLycoperosideFGEsculeosideA <dbl> 9.13327309, -0.20294613, 20.…
## $ EsculeosideB1 <dbl> 0.148504676, -0.005328571, 0…
## $ EsculeosideB2 <dbl> 0.025751543, -0.000948925, 0…
## $ EsculeosideB3 <dbl> 0.213715674, -0.004572162, 0…
## $ TotalEsculeosideB <dbl> 0.387971894, -0.010849657, 1…
## $ Total <dbl> 12.795972, 27.711055, 28.352…
## $ Latitude <chr> "-13.532", "-1.483333", "15.…
## $ Longitude <chr> "-71.967500000000001", "-78"…
## $ Dim.1 <dbl> -0.2505624921, 2.9834103837,…
## $ Dim.2 <dbl> 0.1341207, -1.9245262, 2.605…
## $ Dim.3 <dbl> -0.04667415, -3.34437043, 0.…
## $ Dim.4 <dbl> -0.112968939, 2.569235923, -…
## $ Dim.5 <dbl> 0.07858090, 6.00800998, 0.23…
## $ hclust_end_order <int> 23, 6, 102, 101, 87, 15, 18,…
## $ hclust_3_cluster <fct> 1, 3, 2, 2, 2, 1, 1, 2, 2, 2…
(PCA_3_HCA <- Alkaloids_LSmeans_forHCA_endlabelorder_fordend_withclust_wildcherry %>%
ggplot(aes(x = Dim.1, y = Dim.2,
fill = hclust_3_cluster,
label = hclust_3_cluster)) +
geom_point(size = 2.5, alpha = 0.8, shape = 22) +
scale_fill_viridis_d() +
labs(title = "PCA Scores Plot Colored by Hierarchical Cluster",
subtitle = "Ward's D2 Linkage, Wild Cherry Only",
x = "PC1: 32.2%",
y = "PC2: 30.0%") +
theme_classic() +
theme(text = element_text(size = 12),
axis.title = element_text(size = 12),
axis.text = element_text(size = 12),
legend.position = "none"))
ggsave(filename = "HCA_3clusters.png",
plot = PCA_3_HCA,
dpi = 1200,
width = 9,
height = 6)
Labelling the accessions in the bottom cluster.
kable(head(Alkaloids_LSmeans_forHCA_endlabelorder_fordend_withclust_wildcherry))
| Genotype | Plot_Source | Species | Class | Origin | Provence | Blanca_Cluster1 | Blanca_Cluster2 | Passport_Species | Passport_Classification | Sim_Grouping | Dehydrotomatidine | Tomatidine | DehydrotomatineA1 | Dehydrotomatine2 | TotalDehydrotomatine | Tomatine | Hydroxytomatine1 | Hydroxytomatine2 | Hydroxytomatine3 | Hydroxytomatine4 | TotalHydroxytomatine | Acetoxytomatine1 | Acetoxytomatine2 | Acetoxytomatine3 | TotalAcetoxytomatine | DehydrolycoperosideFGdehydroesculeosideA | LycoperosideFGEsculeosideA1 | LycoperosideFGEsculeosideA2 | TotalLycoperosideFGEsculeosideA | EsculeosideB1 | EsculeosideB2 | EsculeosideB3 | TotalEsculeosideB | Total | Latitude | Longitude | Dim.1 | Dim.2 | Dim.3 | Dim.4 | Dim.5 | hclust_end_order | hclust_3_cluster |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| LA1314 | SG13-403x | Wild Cherry | Wild Cherry | Peru | Cusco | SLC_Peru | SLC_Peru_3 | SLC | SLC_Peru_I3 | Not_Classified | 0.0000947 | 0.0028536 | 0.1131426 | 0.0021165 | 0.1152591 | 1.0421626 | 0.0471450 | 0.9868761 | 0.1509907 | 0.1840337 | 1.3690455 | 0.2118348 | 0.3376865 | 0.0742160 | 0.6237373 | 0.1215743 | 0.6602101 | 8.4730630 | 9.1332731 | 0.1485047 | 0.0257515 | 0.2137157 | 0.3879719 | 12.79597 | -13.532 | -71.967500000000001 | -0.2505625 | 0.1341207 | -0.0466742 | -0.1129689 | 0.0785809 | 23 | 1 |
| LA1338 | SG13-404x | Wild Cherry | Wild Cherry | Ecuador | Napo | SLC_Ecuador | SLC_Ecuador_1 | SLC | SLC | Not_Classified | 0.0007557 | 0.0297999 | 0.1816914 | 0.0012314 | 0.1829229 | 2.0106549 | 0.9745796 | 1.7829255 | 19.5738064 | 3.3775587 | 25.7088702 | -0.0034492 | -0.0027227 | -0.0005286 | -0.0067004 | -0.0014528 | -0.0027741 | -0.2001721 | -0.2029461 | -0.0053286 | -0.0009489 | -0.0045722 | -0.0108497 | 27.71105 | -1.483333 | -78 | 2.9834104 | -1.9245262 | -3.3443704 | 2.5692359 | 6.0080100 | 6 | 3 |
| LA1464 | SG13-407x | Wild Cherry | Wild Cherry | Honduras | Unknown | SLC_non_Andean | SLC_Mesoamerica | SLC | SLC_Mesoamerica | Not_Classified | 0.0000961 | 0.0039670 | 0.2192760 | 0.0061383 | 0.2254143 | 1.9370674 | 0.0894665 | 1.5262340 | 0.5604863 | 1.0083278 | 3.1847315 | 0.2090763 | 0.3367693 | 0.1678508 | 0.7136964 | 0.4518280 | 1.6764799 | 18.7002105 | 20.3766904 | 0.5121216 | 0.1122165 | 0.8350692 | 1.4594073 | 28.35268 | 15.2 | -86.241900000000001 | 1.6899045 | 2.6052804 | 0.0632207 | -0.5510405 | 0.2328861 | 102 | 2 |
| LA1512 | SG13-408x | Wild Cherry | Wild Cherry | El Salvador | Unknown | SLC_non_Andean | SLC_Mesoamerica | SLC | SLC_Mesoamerica | Not_Classified | -0.0000111 | 0.0024415 | 0.0165522 | 0.0000000 | 0.0165522 | 0.1963570 | 0.0707200 | 1.1800452 | 0.2465679 | 0.1930546 | 1.6903876 | 0.1278093 | 0.0832638 | 0.0141662 | 0.2252393 | 0.2895555 | 1.6448154 | 15.4073864 | 17.0522018 | 0.4789698 | 0.1101663 | 0.7379315 | 1.3270677 | 20.79979 | 13.7942 | -88.896500000000003 | 0.5474504 | 2.1285400 | -0.0133431 | -0.4664860 | 0.1442798 | 101 | 2 |
| LA1542 | SG14-102x | Wild Cherry | Wild Cherry | Costa Rica | Unknown | SLC_non_Andean | SLC_Costa_Rica | SLC | SLC | Not_Classified | 0.0000344 | 0.0147139 | 0.1001867 | 0.0010964 | 0.1012830 | 1.1893261 | 0.0399890 | 1.4806166 | 0.2776032 | 0.6097367 | 2.4079455 | 0.2565412 | 0.2979414 | 0.1174430 | 0.6719255 | 0.4330046 | 2.0954784 | 20.9710741 | 23.0665526 | 0.3705859 | 0.0620427 | 0.6684554 | 1.1010841 | 28.98587 | 9.9 | -83.666667000000004 | 1.4629241 | 2.4753846 | 0.1722504 | -0.6019816 | 0.3938678 | 87 | 2 |
| LA1549 | SG13-411x | Wild Cherry | Wild Cherry | Peru | Pasco | SLC_Peru | SLC_Peru_2 | SLC | SLC | Not_Classified | -0.0000006 | 0.0001202 | 0.0574876 | 0.0006432 | 0.0581308 | 0.1689783 | 0.0082920 | 0.4320073 | 0.1008166 | 0.2264037 | 0.7675196 | 0.0890501 | 0.1289289 | 0.0407354 | 0.2587144 | 0.1400177 | 0.2159879 | 3.6698807 | 3.8858686 | 0.1235214 | 0.0188230 | 0.1404762 | 0.2828206 | 5.56217 | -10.583333 | -75.483333000000002 | -0.8856488 | -0.1391765 | -0.0634522 | -0.2028354 | 0.0823163 | 15 | 1 |
# create character vector of Genotypes in bottom cluster
bottom_wild_cherry_forfilt <- c("LA2126A",
"LA1338",
"LA1654",
"LA2262",
"LA2213",
"LA2256",
"LA2308",
"LA1701",
"PI155372",
"PI129128")
# create new df which only includes those bottom cluster Genotypes
Alkaloids_LSmeans_forHCA_endlabelorder_fordend_withclust_wildcherry_bottom <-
Alkaloids_LSmeans_forHCA_endlabelorder_fordend_withclust_wildcherry %>%
filter(Genotype %in% bottom_wild_cherry_forfilt)
dim(Alkaloids_LSmeans_forHCA_endlabelorder_fordend_withclust_wildcherry_bottom)
## [1] 10 44
# get the same location of labels each time
set.seed(123) # because geom_label_repel iterates
(PCA_3_HCA_bottomclusterlabelled <-
Alkaloids_LSmeans_forHCA_endlabelorder_fordend_withclust_wildcherry %>%
ggplot(aes(x = Dim.1, y = Dim.2,
fill = hclust_3_cluster,
label = hclust_3_cluster)) +
geom_point(size = 2.5, alpha = 0.8, shape = 22) +
geom_label_repel(data = Alkaloids_LSmeans_forHCA_endlabelorder_fordend_withclust_wildcherry_bottom,
aes(label = Genotype), fill = "white") +
scale_fill_viridis_d() +
labs(title = "PCA Scores Plot Colored by Hierarchical Cluster",
subtitle = "Ward's D2 Linkage, Wild Cherry Only",
x = "PC1: 32.2%",
y = "PC2: 30.0%") +
theme_classic() +
theme(text = element_text(size = 12),
axis.title = element_text(size = 12),
axis.text = element_text(size = 12),
legend.position = "none"))
ggsave(filename = "HCA_3clusters_bottomclusterlabelled.jpg",
plot = PCA_3_HCA_bottomclusterlabelled,
dpi = 1200,
width = 9,
height = 6)
UPLOADING SOON.
Create Manhattan plots from the GWAS and mQTL analysis in our diversity panel and bi-parental populations, respectively. Selection criteria included known patterns of genetic diversity as determined by genotyping using a 7,720 SNP array (Sim et al., 2012a; Blanca et al., 2015), previous phenotypic information for alkaloid content (Rick et al., 1994), and geographic origin (visualized in Fig. S1.). Alkaloids were phenotyped using our previously published method (Dzakovich et al., 2020).
diversity_GWAS_raw <- read_excel("SteroidalAlkaloidsSupplementalData.xlsx",
sheet = "GWAS Output_MAF10Pct")
# what are the dimensions of this data?
dim(diversity_GWAS_raw)
## [1] 5403 15
# what is the structure of this dataframe?
str(diversity_GWAS_raw)
## tibble [5,403 × 15] (S3: tbl_df/tbl/data.frame)
## $ MARKER : chr [1:5403] "solcap_snp_sl_15058" "solcap_snp_sl_60635" "solcap_snp_sl_60604" "solcap_snp_sl_15056" ...
## $ LOCUS : num [1:5403] 1 2 3 4 5 6 7 8 9 10 ...
## $ CHR : num [1:5403] 1 1 1 1 1 1 1 1 1 1 ...
## $ Phy_Posbp : num [1:5403] 60975 62673 206094 274511 313487 ...
## $ Ch_Mb : num [1:5403] 1 1 1 1 1 ...
## $ Dehydrotomatidine_neg_log10_pval : num [1:5403] 0.0143 0 0 0 0 ...
## $ Tomatidine_neg_log10_pval : num [1:5403] 0.15 0 0 0 0 ...
## $ Dehydrotomatine_neg_log10_pval : num [1:5403] 0 0 0 0 0 0 0 0 0 0 ...
## $ Alpha_Tomatine_neg_log10_pval : num [1:5403] 0 0 0 0 0 0 0 0 0 0 ...
## $ Hydroxytomatine_neg_log10_pval : num [1:5403] 0 0 0 0 0 0 0 0 0 0 ...
## $ Acetoxytomatine_neg_log10_pval : num [1:5403] 0.00763 0 0 0 0 ...
## $ DehydrolycoperosideF_G_Dehydroesculeoside_A_neg_log10_pval: num [1:5403] 0.00182 0.00802 0 0 0 ...
## $ LycoperosideF_G_Esculeoside_A_neg_log10_pval : num [1:5403] 0 0 0 0 0 0 0 0 0 0 ...
## $ Esculeoside_B_neg_log10_pval : num [1:5403] 0 0 0 0 0 0 0 0 0 0 ...
## $ Total_neg_log10_pval : num [1:5403] 0 0 0 0 0 0 0 0 0 0 ...
Making data tidy facilitates creating Manhattan plots that are faceted by each different alkaloid.
diversity_GWAS_tidy <- diversity_GWAS_raw %>%
pivot_longer(cols = Dehydrotomatidine_neg_log10_pval:Total_neg_log10_pval,
names_to = "alkaloid",
values_to = "pvalue")
# check dataframe dimensions
dim(diversity_GWAS_tidy)
## [1] 54030 7
Setting up labels for use with labeller.
alk_labels <- c(
Dehydrotomatidine_neg_log10_pval = "Dehydrotomatidine",
Tomatidine_neg_log10_pval = "Tomatidine",
Dehydrotomatine_neg_log10_pval = "Dehydrotomatine",
Alpha_Tomatine_neg_log10_pval = "Alpha-Tomatine",
Hydroxytomatine_neg_log10_pval = "Hydroxytomatine",
Acetoxytomatine_neg_log10_pval = "Acetoxytomatine",
DehydrolycoperosideF_G_Dehydroesculeoside_A_neg_log10_pval = "Dehydrolycoperoside F/G/Dehydroesculeoside A",
LycoperosideF_G_Esculeoside_A_neg_log10_pval = "Lycoperoside F/G/Esculeoside A",
Esculeoside_B_neg_log10_pval = "Esculeoside B",
Total_neg_log10_pval = "Total Steroidal Alkaloids")
This will make our faceted plot go in the alkaloid biosynthetic pathway order, instead of alphabetically.
diversity_GWAS_tidy$alkaloid <-
factor(diversity_GWAS_tidy$alkaloid,
levels = c("Dehydrotomatidine_neg_log10_pval",
"Tomatidine_neg_log10_pval",
"Dehydrotomatine_neg_log10_pval",
"Alpha_Tomatine_neg_log10_pval",
"Hydroxytomatine_neg_log10_pval",
"Acetoxytomatine_neg_log10_pval",
"DehydrolycoperosideF_G_Dehydroesculeoside_A_neg_log10_pval",
"LycoperosideF_G_Esculeoside_A_neg_log10_pval",
"Esculeoside_B_neg_log10_pval",
"Total_neg_log10_pval"))
str(diversity_GWAS_tidy)
## tibble [54,030 × 7] (S3: tbl_df/tbl/data.frame)
## $ MARKER : chr [1:54030] "solcap_snp_sl_15058" "solcap_snp_sl_15058" "solcap_snp_sl_15058" "solcap_snp_sl_15058" ...
## $ LOCUS : num [1:54030] 1 1 1 1 1 1 1 1 1 1 ...
## $ CHR : num [1:54030] 1 1 1 1 1 1 1 1 1 1 ...
## $ Phy_Posbp: num [1:54030] 60975 60975 60975 60975 60975 ...
## $ Ch_Mb : num [1:54030] 1 1 1 1 1 ...
## $ alkaloid : Factor w/ 10 levels "Dehydrotomatidine_neg_log10_pval",..: 1 2 3 4 5 6 7 8 9 10 ...
## $ pvalue : num [1:54030] 0.0143 0.1498 0 0 0 ...
class(diversity_GWAS_tidy$alkaloid)
## [1] "factor"
levels(diversity_GWAS_tidy$alkaloid)
## [1] "Dehydrotomatidine_neg_log10_pval"
## [2] "Tomatidine_neg_log10_pval"
## [3] "Dehydrotomatine_neg_log10_pval"
## [4] "Alpha_Tomatine_neg_log10_pval"
## [5] "Hydroxytomatine_neg_log10_pval"
## [6] "Acetoxytomatine_neg_log10_pval"
## [7] "DehydrolycoperosideF_G_Dehydroesculeoside_A_neg_log10_pval"
## [8] "LycoperosideF_G_Esculeoside_A_neg_log10_pval"
## [9] "Esculeoside_B_neg_log10_pval"
## [10] "Total_neg_log10_pval"
Here we have one mondo figure with all the alkaloid Manhattan plots on the same axis. Points are colored red if they are significant at the 0.05 level after a FDR correction. The input data are FDR corrected, and a -log10pvalue of 1.301 is the same as P = 0.05 FDR corrected.
diversity_GWAS_tidy %>%
ggplot(aes(x = (CHR+(Phy_Posbp/75000000)), y = pvalue, group = alkaloid)) +
geom_point(aes(color = pvalue > 1.301), size=.5, stat = "identity") +
scale_x_continuous(breaks = unique(diversity_GWAS_tidy$CHR),
label = unique(diversity_GWAS_tidy$CHR)) +
scale_y_continuous(expand = c(0,0)) +
geom_hline(aes(yintercept= 1.301), color = "grey", linetype = "dashed") +
scale_color_manual(values = c("black", "red")) +
theme_classic() +
theme(legend.position = "none") +
xlab("Chromosome") +
ylab(expression("-log"[10]* " FDR Corrected P-Value")) +
facet_wrap(~alkaloid,
nrow = 2,
ncol = 5,
labeller = as_labeller(alk_labels, default = label_wrap_gen(28)))
This will make it easier to tell which markers are on which chromosome.
diversity_GWAS_alt_chr <- diversity_GWAS_tidy %>%
ggplot(aes(x = (CHR+(Phy_Posbp/75000000)), y = pvalue,
color = as.factor(CHR), group = alkaloid)) +
geom_point(size=1, stat = "identity") +
scale_x_continuous(breaks = unique(diversity_GWAS_tidy$CHR),
label = unique(diversity_GWAS_tidy$CHR)) +
scale_y_continuous(expand = c(0,0)) +
geom_hline(aes(yintercept= 1.301), color = "grey", linetype = "dashed") +
scale_color_manual(values = rep(c("black", "gray"), 12)) +
theme_classic() +
theme(legend.position = "none") +
xlab("Chromosome") +
ylab(expression("FDR corrected "-log[10](P))) +
facet_wrap(~alkaloid,
nrow = 2,
ncol = 5,
labeller = as_labeller(alk_labels, default = label_wrap_gen(28)),
scales = "free_x")
diversity_GWAS_alt_chr
ggsave("Diversity_GWAS_alt_chr.png",
plot = diversity_GWAS_alt_chr,
dpi = 1200,
width = 10,
height = 6)
All y-axis scales are independent.
diversity_GWAS_alt_chr_free_y <- diversity_GWAS_tidy %>%
ggplot(aes(x = (CHR+(Phy_Posbp/75000000)), y = pvalue,
color = as.factor(CHR), group = alkaloid)) +
geom_point(size=1, stat = "identity") +
scale_x_continuous(breaks = unique(diversity_GWAS_tidy$CHR),
label = unique(diversity_GWAS_tidy$CHR)) +
scale_y_continuous(expand = c(0,0)) +
geom_hline(aes(yintercept= 1.301), color = "grey", linetype = "dashed") +
scale_color_manual(values = rep(c("black", "gray"), 12)) +
theme_classic() +
theme(legend.position = "none") +
xlab("Chromosome") +
ylab(expression("FDR corrected "-log[10](P))) +
facet_wrap(~alkaloid,
nrow = 2,
ncol = 5,
labeller = as_labeller(alk_labels, default = label_wrap_gen(28)),
scales = "free")
diversity_GWAS_alt_chr_free_y
ggsave("Diversity_GWAS_alt_chr_free_y.png",
plot = diversity_GWAS_alt_chr_free_y,
dpi = 1200,
width = 10,
height = 6)
kable(head(diversity_GWAS_raw))
| MARKER | LOCUS | CHR | Phy_Posbp | Ch_Mb | Dehydrotomatidine_neg_log10_pval | Tomatidine_neg_log10_pval | Dehydrotomatine_neg_log10_pval | Alpha_Tomatine_neg_log10_pval | Hydroxytomatine_neg_log10_pval | Acetoxytomatine_neg_log10_pval | DehydrolycoperosideF_G_Dehydroesculeoside_A_neg_log10_pval | LycoperosideF_G_Esculeoside_A_neg_log10_pval | Esculeoside_B_neg_log10_pval | Total_neg_log10_pval |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| solcap_snp_sl_15058 | 1 | 1 | 60975 | 1.000610 | 0.0142731 | 0.1498227 | 0 | 0 | 0 | 0.0076282 | 0.0018163 | 0 | 0 | 0 |
| solcap_snp_sl_60635 | 2 | 1 | 62673 | 1.000627 | 0.0000000 | 0.0000000 | 0 | 0 | 0 | 0.0000000 | 0.0080247 | 0 | 0 | 0 |
| solcap_snp_sl_60604 | 3 | 1 | 206094 | 1.002061 | 0.0000000 | 0.0000000 | 0 | 0 | 0 | 0.0000000 | 0.0000000 | 0 | 0 | 0 |
| solcap_snp_sl_15056 | 4 | 1 | 274511 | 1.002745 | 0.0000000 | 0.0000000 | 0 | 0 | 0 | 0.0000000 | 0.0000000 | 0 | 0 | 0 |
| solcap_snp_sl_15055 | 5 | 1 | 313487 | 1.003135 | 0.0000000 | 0.0000000 | 0 | 0 | 0 | 0.0000000 | 0.0000000 | 0 | 0 | 0 |
| solcap_snp_sl_15054 | 6 | 1 | 313633 | 1.003136 | 0.0000000 | 0.0000000 | 0 | 0 | 0 | 0.0000000 | 0.0000000 | 0 | 0 | 0 |
diversity_GWAS_manhattan_plots <- function(g){
diversity_GWAS_raw %>%
ggplot(aes(x = (CHR+(Phy_Posbp/75000000)), color = as.factor(CHR))) +
geom_point(aes_(y = as.name(g)), size=1, stat = "identity") +
scale_x_continuous(breaks = unique(diversity_GWAS_tidy$CHR),
label = unique(diversity_GWAS_tidy$CHR)) +
scale_y_continuous(expand = c(0,0)) +
geom_hline(aes(yintercept= 1.301), color = "grey", linetype = "dashed") +
scale_color_manual(values = rep(c("black", "gray"), 12)) +
theme_classic() +
theme(legend.position = "none") +
labs(title = paste(g),
x ="Chromosome",
y = (expression("FDR corrected "-log[10](P))))
}
all_diversity_gwas_manhatan_plots <- lapply(names(diversity_GWAS_raw[,6:ncol(diversity_GWAS_raw)]),
diversity_GWAS_manhattan_plots)
all_diversity_gwas_manhatan_plots
## [[1]]
##
## [[2]]
##
## [[3]]
##
## [[4]]
##
## [[5]]
##
## [[6]]
##
## [[7]]
##
## [[8]]
##
## [[9]]
##
## [[10]]
biparental_GWAS_raw <- read_excel("SteroidalAlkaloidsSupplementalData.xlsx",
sheet = "BC1S1 Output MAF10Pct")
# what are the dimensions of this data?
dim(biparental_GWAS_raw)
## [1] 139 17
# what is the structure of this dataframe?
str(biparental_GWAS_raw)
## tibble [139 × 17] (S3: tbl_df/tbl/data.frame)
## $ MARKER : chr [1:139] "solcap_snp_sl_60078" "solcap_snp_sl_59771" "solcap_snp_sl_13762" "solcap_snp_sl_43632" ...
## $ Chr : num [1:139] 1 1 1 1 1 2 2 2 2 2 ...
## $ Phy_Posbp : num [1:139] 2955601 6229659 67855513 77935539 87977912 ...
## $ Ch_Mb : num [1:139] 1.03 1.06 1.68 1.78 1.88 ...
## $ Gen_PoscM : chr [1:139] "NA" "NA" "41.666899999999998" "NA" ...
## $ Phy_Chr : chr [1:139] "SL2.40ch01" "SL2.40ch01" "SL2.40ch01" "SL2.40ch01" ...
## $ cM : chr [1:139] "NA" "NA" "0.320514615" "NA" ...
## $ Dehydrotomatidine_neg_log10_pval : num [1:139] 0.0216 0.1346 0.0285 0.1346 0.1346 ...
## $ Tomatidine_neg_log10_pval : num [1:139] 0.2062 0.1159 0.1319 0.0922 0.9355 ...
## $ Dehydrotomatine_neg_log10_pval : num [1:139] 0.175 0.175 0.175 0.175 0.282 ...
## $ Alpha_Tomatine_neg_log10_pval : num [1:139] 0.0289 0.0289 0.0289 0.1195 0.2449 ...
## $ Hydroxytomatine_neg_log10_pval : num [1:139] 0.295 0.425 0.295 0.961 0.295 ...
## $ Acetoxytomatine_neg_log10_pval : num [1:139] 0.155 0.171 0.155 0.175 0.327 ...
## $ DehydrolycoperosideF_G_Dehydroesculeoside_A_neg_log10_pval: num [1:139] 0.313 0.727 0.203 0.727 0.15 ...
## $ LycoperosideF_G_Esculeoside_A_neg_log10_pval : num [1:139] 0.368 0.488 0.198 1.206 0.21 ...
## $ Esculeoside_B_neg_log10_pval : num [1:139] 0.13 0.51 0.51 0.482 0.13 ...
## $ Total_neg_log10_pval : num [1:139] 0.0711 0.0711 0.0711 0.2056 0.2056 ...
Making data tidy facilitates faceting by alkaloids.
biparental_GWAS_tidy <- biparental_GWAS_raw %>%
pivot_longer(cols = Dehydrotomatidine_neg_log10_pval:Total_neg_log10_pval,
names_to = "alkaloid",
values_to = "pvalue")
# check dataframe dimensions
dim(biparental_GWAS_tidy)
## [1] 1390 9
This will make our faceted plot go in the alkaloid biosynthetic pathway order, instead of alphabetically.
biparental_GWAS_tidy$alkaloid <-
factor(biparental_GWAS_tidy$alkaloid,
levels = c("Dehydrotomatidine_neg_log10_pval",
"Tomatidine_neg_log10_pval",
"Dehydrotomatine_neg_log10_pval",
"Alpha_Tomatine_neg_log10_pval",
"Hydroxytomatine_neg_log10_pval",
"Acetoxytomatine_neg_log10_pval",
"DehydrolycoperosideF_G_Dehydroesculeoside_A_neg_log10_pval",
"LycoperosideF_G_Esculeoside_A_neg_log10_pval",
"Esculeoside_B_neg_log10_pval",
"Total_neg_log10_pval"))
str(biparental_GWAS_tidy)
## tibble [1,390 × 9] (S3: tbl_df/tbl/data.frame)
## $ MARKER : chr [1:1390] "solcap_snp_sl_60078" "solcap_snp_sl_60078" "solcap_snp_sl_60078" "solcap_snp_sl_60078" ...
## $ Chr : num [1:1390] 1 1 1 1 1 1 1 1 1 1 ...
## $ Phy_Posbp: num [1:1390] 2955601 2955601 2955601 2955601 2955601 ...
## $ Ch_Mb : num [1:1390] 1.03 1.03 1.03 1.03 1.03 ...
## $ Gen_PoscM: chr [1:1390] "NA" "NA" "NA" "NA" ...
## $ Phy_Chr : chr [1:1390] "SL2.40ch01" "SL2.40ch01" "SL2.40ch01" "SL2.40ch01" ...
## $ cM : chr [1:1390] "NA" "NA" "NA" "NA" ...
## $ alkaloid : Factor w/ 10 levels "Dehydrotomatidine_neg_log10_pval",..: 1 2 3 4 5 6 7 8 9 10 ...
## $ pvalue : num [1:1390] 0.0216 0.2062 0.1746 0.0289 0.2954 ...
class(biparental_GWAS_tidy$alkaloid)
## [1] "factor"
levels(biparental_GWAS_tidy$alkaloid)
## [1] "Dehydrotomatidine_neg_log10_pval"
## [2] "Tomatidine_neg_log10_pval"
## [3] "Dehydrotomatine_neg_log10_pval"
## [4] "Alpha_Tomatine_neg_log10_pval"
## [5] "Hydroxytomatine_neg_log10_pval"
## [6] "Acetoxytomatine_neg_log10_pval"
## [7] "DehydrolycoperosideF_G_Dehydroesculeoside_A_neg_log10_pval"
## [8] "LycoperosideF_G_Esculeoside_A_neg_log10_pval"
## [9] "Esculeoside_B_neg_log10_pval"
## [10] "Total_neg_log10_pval"
Here we have one mondo figure with all the alkaloid Manhattan plots on the same axis. Points are colored red if they are significant at the 0.05 level after a FDR correction. The input data are FDR corrected, and a -log10pvalue of 1.301 is the same as P = 0.05 FDR corrected.
biparental_GWAS_tidy %>%
ggplot(aes(x = (Chr+(Phy_Posbp/75000000)), y = pvalue, group = alkaloid)) +
geom_point(aes(color = pvalue > 1.301), size=.5, stat = "identity") +
scale_x_continuous(breaks = unique(biparental_GWAS_tidy$Chr),
label = unique(biparental_GWAS_tidy$Chr)) +
scale_y_continuous(expand = c(0,0)) +
geom_hline(aes(yintercept= 1.301), color = "grey", linetype = "dashed") +
scale_color_manual(values = c("black", "red")) +
theme_classic() +
theme(legend.position = "none") +
xlab("Chromosome") +
ylab(expression("-log"[10]* " FDR Corrected P-Value")) +
facet_wrap(~alkaloid,
nrow = 2,
ncol = 5,
labeller = as_labeller(alk_labels, default = label_wrap_gen(28)))
biparental_GWAS_alt_chr <- biparental_GWAS_tidy %>%
ggplot(aes(x = (Chr+(Phy_Posbp/75000000)), y = pvalue,
color = as.factor(Chr), group = alkaloid)) +
geom_point(size=1, stat = "identity") +
scale_x_continuous(breaks = unique(biparental_GWAS_tidy$Chr),
label = unique(biparental_GWAS_tidy$Chr)) +
scale_y_continuous(expand = c(0,0)) +
geom_hline(aes(yintercept= 1.301), color = "grey", linetype = "dashed") +
scale_color_manual(values = rep(c("black", "gray"), 12)) +
theme_classic() +
theme(legend.position = "none") +
xlab("Chromosome") +
ylab(expression("FDR corrected "-log[10](P))) +
facet_wrap(~alkaloid,
nrow = 2,
ncol = 5,
labeller = as_labeller(alk_labels, default = label_wrap_gen(28)),
scales = "free_x")
biparental_GWAS_alt_chr
ggsave("biparental_GWAS_alt_chr.png",
plot = biparental_GWAS_alt_chr,
dpi = 1200,
width = 10,
height = 6)
biparental_GWAS_alt_chr_free_y <- biparental_GWAS_tidy %>%
ggplot(aes(x = (Chr+(Phy_Posbp/75000000)), y = pvalue,
color = as.factor(Chr), group = alkaloid)) +
geom_point(size=1, stat = "identity") +
scale_x_continuous(breaks = unique(biparental_GWAS_tidy$Chr),
label = unique(biparental_GWAS_tidy$Chr)) +
scale_y_continuous(expand = c(0,0)) +
geom_hline(aes(yintercept= 1.301), color = "grey", linetype = "dashed") +
scale_color_manual(values = rep(c("black", "gray"), 12)) +
theme_classic() +
theme(legend.position = "none") +
xlab("Chromosome") +
ylab(expression("FDR corrected "-log[10](P))) +
facet_wrap(~alkaloid,
nrow = 2,
ncol = 5,
labeller = as_labeller(alk_labels, default = label_wrap_gen(28)),
scales = "free")
biparental_GWAS_alt_chr_free_y
ggsave("biparental_GWAS_alt_chr_free_y.png",
plot = biparental_GWAS_alt_chr_free_y,
dpi = 1200,
width = 10,
height = 6)
kable(head(biparental_GWAS_raw))
| MARKER | Chr | Phy_Posbp | Ch_Mb | Gen_PoscM | Phy_Chr | cM | Dehydrotomatidine_neg_log10_pval | Tomatidine_neg_log10_pval | Dehydrotomatine_neg_log10_pval | Alpha_Tomatine_neg_log10_pval | Hydroxytomatine_neg_log10_pval | Acetoxytomatine_neg_log10_pval | DehydrolycoperosideF_G_Dehydroesculeoside_A_neg_log10_pval | LycoperosideF_G_Esculeoside_A_neg_log10_pval | Esculeoside_B_neg_log10_pval | Total_neg_log10_pval |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| solcap_snp_sl_60078 | 1 | 2955601 | 1.029556 | NA | SL2.40ch01 | NA | 0.0215763 | 0.2061754 | 0.1746312 | 0.0288758 | 0.2954108 | 0.1550308 | 0.3127265 | 0.3675994 | 0.1304851 | 0.0710951 |
| solcap_snp_sl_59771 | 1 | 6229659 | 1.062297 | NA | SL2.40ch01 | NA | 0.1346021 | 0.1159026 | 0.1746312 | 0.0288758 | 0.4247042 | 0.1711228 | 0.7267946 | 0.4875734 | 0.5098057 | 0.0710951 |
| solcap_snp_sl_13762 | 1 | 67855513 | 1.678555 | 41.666899999999998 | SL2.40ch01 | 0.320514615 | 0.0285136 | 0.1318688 | 0.1746312 | 0.0288758 | 0.2954108 | 0.1550308 | 0.2028721 | 0.1981261 | 0.5098057 | 0.0710951 |
| solcap_snp_sl_43632 | 1 | 77935539 | 1.779355 | NA | SL2.40ch01 | NA | 0.1346021 | 0.0922492 | 0.1746312 | 0.1194513 | 0.9613055 | 0.1748867 | 0.7267946 | 1.2055482 | 0.4823208 | 0.2056115 |
| solcap_snp_sl_13404 | 1 | 87977912 | 1.879779 | 120.8956 | SL2.40ch01 | 0.92996615399999993 | 0.1346021 | 0.9355302 | 0.2823912 | 0.2449025 | 0.2954108 | 0.3269503 | 0.1497593 | 0.2099169 | 0.1304851 | 0.2056115 |
| solcap_snp_sl_7410 | 2 | 2309824 | 2.023098 | NA | SL2.40ch02 | NA | 0.1346021 | 0.1159026 | 0.2707129 | 0.0816134 | 0.2954108 | 0.3269503 | 0.2028721 | 0.3463221 | 0.1304851 | 0.0710951 |
biparental_GWAS_manhattan_plots <- function(g){
biparental_GWAS_raw %>%
ggplot(aes(x = (Chr+(Phy_Posbp/75000000)), color = as.factor(Chr))) +
geom_point(aes_(y = as.name(g)), size=1, stat = "identity") +
scale_x_continuous(breaks = unique(biparental_GWAS_raw$Chr),
label = unique(biparental_GWAS_raw$Chr)) +
geom_hline(aes(yintercept= 1.301), color = "grey", linetype = "dashed") +
scale_color_manual(values = rep(c("black", "gray"), 12)) +
theme_classic() +
theme(legend.position = "none") +
labs(title = paste(g),
x ="Chromosome",
y = (expression("FDR corrected "-log[10](P))))
}
all_biparental_gwas_manhatan_plots <- lapply(names(biparental_GWAS_raw[,8:ncol(biparental_GWAS_raw)]),
biparental_GWAS_manhattan_plots)
all_biparental_gwas_manhatan_plots
## [[1]]
##
## [[2]]
##
## [[3]]
##
## [[4]]
##
## [[5]]
##
## [[6]]
##
## [[7]]
##
## [[8]]
##
## [[9]]
##
## [[10]]
We are interested to understand how the concentration of each alkaloid is related to every other alkaloid. To do this, we will conduct a correlation analysis.
The inputs to the correlation analyses are the LS means per genotype.
head(Alkaloids_LSmeans)
## # A tibble: 6 x 37
## Genotype Plot_Source Species Class Origin Provence Blanca_Cluster1
## <chr> <chr> <chr> <chr> <chr> <chr> <chr>
## 1 CULBPT_… 2K9-8584 Proces… Cult… USA NY SLL_processing…
## 2 CULBPT_… 2K9-8622 Proces… Cult… USA NY SLL_processing…
## 3 CULBPT_… 2K17-7708-1 Proces… Cult… USA NY SLL_processing…
## 4 CULBPT0… 2K9-8566 Proces… Cult… USA NY SLL_processing…
## 5 E6203 2K9-8600 Proces… Cult… USA CA SLL_processing…
## 6 F06-2041 2K16-9843 Proces… Cult… USA OH SLL_processing…
## # … with 30 more variables: Blanca_Cluster2 <chr>, Passport_Species <chr>,
## # Passport_Classification <chr>, Sim_Grouping <chr>, Dehydrotomatidine <dbl>,
## # Tomatidine <dbl>, DehydrotomatineA1 <dbl>, Dehydrotomatine2 <dbl>,
## # TotalDehydrotomatine <dbl>, Tomatine <dbl>, Hydroxytomatine1 <dbl>,
## # Hydroxytomatine2 <dbl>, Hydroxytomatine3 <dbl>, Hydroxytomatine4 <dbl>,
## # TotalHydroxytomatine <dbl>, Acetoxytomatine1 <dbl>, Acetoxytomatine2 <dbl>,
## # Acetoxytomatine3 <dbl>, TotalAcetoxytomatine <dbl>,
## # DehydrolycoperosideFGdehydroesculeosideA <dbl>,
## # LycoperosideFGEsculeosideA1 <dbl>, LycoperosideFGEsculeosideA2 <dbl>,
## # TotalLycoperosideFGEsculeosideA <dbl>, EsculeosideB1 <dbl>,
## # EsculeosideB2 <dbl>, EsculeosideB3 <dbl>, TotalEsculeosideB <dbl>,
## # Total <dbl>, Latitude <chr>, Longitude <chr>
# this is already trimmed of some meta-data we don't need
head(Alkaloids_LSmeans_forPCA)
## # A tibble: 6 x 12
## Genotype Class Dehydrotomatidi… Tomatidine TotalDehydrotom… Tomatine
## <chr> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 CULBPT_… Cult… 0.000150 0.00435 0.00615 0.193
## 2 CULBPT_… Cult… -0.0000272 -0.000172 0.00865 0.282
## 3 CULBPT_… Cult… -0.0000649 -0.000252 0.00852 0.176
## 4 CULBPT0… Cult… -0.0000272 0.000126 -0.00387 -0.00614
## 5 E6203 Cult… -0.0000272 0.0000159 0.00995 0.293
## 6 F06-2041 Cult… -0.0000272 -0.000165 -0.00112 0.0170
## # … with 6 more variables: TotalHydroxytomatine <dbl>,
## # TotalAcetoxytomatine <dbl>, DehydrolycoperosideFGdehydroesculeosideA <dbl>,
## # TotalLycoperosideFGEsculeosideA <dbl>, TotalEsculeosideB <dbl>, Total <dbl>
# all isomers
Alkaloids_LSmeans_allisomers_corr <- Alkaloids_LSmeans %>%
select(Genotype, Class, Dehydrotomatidine:Total)
# sums only
Alkaloids_LSmeans_sums_corr <- Alkaloids_LSmeans_forPCA %>%
select(Genotype, Class, Dehydrotomatidine:Total)
Alkaloids_sums_corr_matrix <- cor(Alkaloids_LSmeans_sums_corr[,3:ncol(Alkaloids_LSmeans_sums_corr)],
method = "pearson")
kable(Alkaloids_sums_corr_matrix)
| Dehydrotomatidine | Tomatidine | TotalDehydrotomatine | Tomatine | TotalHydroxytomatine | TotalAcetoxytomatine | DehydrolycoperosideFGdehydroesculeosideA | TotalLycoperosideFGEsculeosideA | TotalEsculeosideB | Total | |
|---|---|---|---|---|---|---|---|---|---|---|
| Dehydrotomatidine | 1.0000000 | 0.1958081 | 0.0800031 | 0.0856258 | 0.1463775 | 0.0700602 | 0.0660130 | 0.1257124 | 0.1973726 | 0.1778680 |
| Tomatidine | 0.1958081 | 1.0000000 | 0.5633672 | 0.5340258 | 0.1611836 | 0.0524480 | 0.0320171 | 0.0419116 | 0.0459817 | 0.2898556 |
| TotalDehydrotomatine | 0.0800031 | 0.5633672 | 1.0000000 | 0.8982311 | 0.2841456 | 0.4243220 | -0.1007251 | -0.1368764 | -0.1708610 | 0.6085030 |
| Tomatine | 0.0856258 | 0.5340258 | 0.8982311 | 1.0000000 | 0.1063700 | 0.1017999 | -0.1348184 | -0.1594540 | -0.1648607 | 0.3740744 |
| TotalHydroxytomatine | 0.1463775 | 0.1611836 | 0.2841456 | 0.1063700 | 1.0000000 | 0.4772983 | 0.0445803 | 0.0275158 | 0.0021843 | 0.5670118 |
| TotalAcetoxytomatine | 0.0700602 | 0.0524480 | 0.4243220 | 0.1017999 | 0.4772983 | 1.0000000 | -0.1037893 | -0.1228584 | -0.1388088 | 0.7587569 |
| DehydrolycoperosideFGdehydroesculeosideA | 0.0660130 | 0.0320171 | -0.1007251 | -0.1348184 | 0.0445803 | -0.1037893 | 1.0000000 | 0.9389721 | 0.7943348 | 0.4024231 |
| TotalLycoperosideFGEsculeosideA | 0.1257124 | 0.0419116 | -0.1368764 | -0.1594540 | 0.0275158 | -0.1228584 | 0.9389721 | 1.0000000 | 0.8974951 | 0.4104711 |
| TotalEsculeosideB | 0.1973726 | 0.0459817 | -0.1708610 | -0.1648607 | 0.0021843 | -0.1388088 | 0.7943348 | 0.8974951 | 1.0000000 | 0.3413784 |
| Total | 0.1778680 | 0.2898556 | 0.6085030 | 0.3740744 | 0.5670118 | 0.7587569 | 0.4024231 | 0.4104711 | 0.3413784 | 1.0000000 |
# run cor.mtest to get pvalues and CI for each pair of inputs
sums_cor_mtest <- cor.mtest(Alkaloids_sums_corr_matrix,
conf.level = 0.95)
# save the pvalue matrix
sums_pval_matrix <- sums_cor_mtest$p
Prettying up the axis labels
axis_labels_totals <- c("Dehydrotomatidine",
"Tomatidine",
"Dehydrotomatine",
"Alpha-Tomatine",
"Hydroxytomatidine",
"Acetoxytomatidine",
"Dehydrolycoperoside F/G/Dehydroesculeoside A",
"Lycoperoside F/G/Esculeoside A",
"Escueloside B",
"Total SteroidalAlkaloids")
colnames(Alkaloids_sums_corr_matrix) <- axis_labels_totals %>% str_wrap(width = 24)
rownames(Alkaloids_sums_corr_matrix) <- axis_labels_totals %>% str_wrap(width = 24)
Create corrplot
corrplot_sum_fullpop <- corrplot(Alkaloids_sums_corr_matrix,
method = "circle",
p.mat = sums_pval_matrix,
insig = "label_sig",
type = "upper",
sig.level = c(.001, .01, .05),
outline = TRUE,
pch.cex = 1, # size of asterisks
pch.col = "white", # color of asterisks
tl.cex= 1, # size of axis text
tl.col="black", # color of axis text
title = "Full Population")
corrplot_sum_fullpop
## Dehydrotomatidine Tomatidine
## Dehydrotomatidine 1.00000000 0.19580805
## Tomatidine 0.19580805 1.00000000
## Dehydrotomatine 0.08000305 0.56336719
## Alpha-Tomatine 0.08562579 0.53402579
## Hydroxytomatidine 0.14637746 0.16118361
## Acetoxytomatidine 0.07006019 0.05244799
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.06601296 0.03201708
## Lycoperoside F/G/\nEsculeoside A 0.12571240 0.04191165
## Escueloside B 0.19737260 0.04598168
## Total SteroidalAlkaloids 0.17786796 0.28985563
## Dehydrotomatine Alpha-Tomatine
## Dehydrotomatidine 0.08000305 0.08562579
## Tomatidine 0.56336719 0.53402579
## Dehydrotomatine 1.00000000 0.89823113
## Alpha-Tomatine 0.89823113 1.00000000
## Hydroxytomatidine 0.28414556 0.10637004
## Acetoxytomatidine 0.42432200 0.10179991
## Dehydrolycoperoside F/G/\nDehydroesculeoside A -0.10072509 -0.13481845
## Lycoperoside F/G/\nEsculeoside A -0.13687639 -0.15945398
## Escueloside B -0.17086098 -0.16486072
## Total SteroidalAlkaloids 0.60850304 0.37407436
## Hydroxytomatidine
## Dehydrotomatidine 0.146377464
## Tomatidine 0.161183612
## Dehydrotomatine 0.284145556
## Alpha-Tomatine 0.106370043
## Hydroxytomatidine 1.000000000
## Acetoxytomatidine 0.477298283
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.044580274
## Lycoperoside F/G/\nEsculeoside A 0.027515791
## Escueloside B 0.002184304
## Total SteroidalAlkaloids 0.567011840
## Acetoxytomatidine
## Dehydrotomatidine 0.07006019
## Tomatidine 0.05244799
## Dehydrotomatine 0.42432200
## Alpha-Tomatine 0.10179991
## Hydroxytomatidine 0.47729828
## Acetoxytomatidine 1.00000000
## Dehydrolycoperoside F/G/\nDehydroesculeoside A -0.10378930
## Lycoperoside F/G/\nEsculeoside A -0.12285842
## Escueloside B -0.13880876
## Total SteroidalAlkaloids 0.75875692
## Dehydrolycoperoside F/G/\nDehydroesculeoside A
## Dehydrotomatidine 0.06601296
## Tomatidine 0.03201708
## Dehydrotomatine -0.10072509
## Alpha-Tomatine -0.13481845
## Hydroxytomatidine 0.04458027
## Acetoxytomatidine -0.10378930
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 1.00000000
## Lycoperoside F/G/\nEsculeoside A 0.93897211
## Escueloside B 0.79433475
## Total SteroidalAlkaloids 0.40242306
## Lycoperoside F/G/\nEsculeoside A
## Dehydrotomatidine 0.12571240
## Tomatidine 0.04191165
## Dehydrotomatine -0.13687639
## Alpha-Tomatine -0.15945398
## Hydroxytomatidine 0.02751579
## Acetoxytomatidine -0.12285842
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.93897211
## Lycoperoside F/G/\nEsculeoside A 1.00000000
## Escueloside B 0.89749512
## Total SteroidalAlkaloids 0.41047113
## Escueloside B
## Dehydrotomatidine 0.197372597
## Tomatidine 0.045981680
## Dehydrotomatine -0.170860976
## Alpha-Tomatine -0.164860723
## Hydroxytomatidine 0.002184304
## Acetoxytomatidine -0.138808756
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.794334751
## Lycoperoside F/G/\nEsculeoside A 0.897495116
## Escueloside B 1.000000000
## Total SteroidalAlkaloids 0.341378371
## Total SteroidalAlkaloids
## Dehydrotomatidine 0.1778680
## Tomatidine 0.2898556
## Dehydrotomatine 0.6085030
## Alpha-Tomatine 0.3740744
## Hydroxytomatidine 0.5670118
## Acetoxytomatidine 0.7587569
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.4024231
## Lycoperoside F/G/\nEsculeoside A 0.4104711
## Escueloside B 0.3413784
## Total SteroidalAlkaloids 1.0000000
Alkaloids_LSmeans_sums_corr_cultproc <- Alkaloids_LSmeans_sums_corr %>%
filter(Class == "Cultivated Processing")
head(Alkaloids_LSmeans_sums_corr_cultproc)
## # A tibble: 6 x 12
## Genotype Class Dehydrotomatidi… Tomatidine TotalDehydrotom… Tomatine
## <chr> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 CULBPT_… Cult… 0.000150 0.00435 0.00615 0.193
## 2 CULBPT_… Cult… -0.0000272 -0.000172 0.00865 0.282
## 3 CULBPT_… Cult… -0.0000649 -0.000252 0.00852 0.176
## 4 CULBPT0… Cult… -0.0000272 0.000126 -0.00387 -0.00614
## 5 E6203 Cult… -0.0000272 0.0000159 0.00995 0.293
## 6 F06-2041 Cult… -0.0000272 -0.000165 -0.00112 0.0170
## # … with 6 more variables: TotalHydroxytomatine <dbl>,
## # TotalAcetoxytomatine <dbl>, DehydrolycoperosideFGdehydroesculeosideA <dbl>,
## # TotalLycoperosideFGEsculeosideA <dbl>, TotalEsculeosideB <dbl>, Total <dbl>
Alkaloids_sums_corr_matrix_cultproc <- cor(Alkaloids_LSmeans_sums_corr_cultproc[,3:ncol(Alkaloids_LSmeans_sums_corr_cultproc)],
method = "pearson")
kable(Alkaloids_sums_corr_matrix_cultproc)
| Dehydrotomatidine | Tomatidine | TotalDehydrotomatine | Tomatine | TotalHydroxytomatine | TotalAcetoxytomatine | DehydrolycoperosideFGdehydroesculeosideA | TotalLycoperosideFGEsculeosideA | TotalEsculeosideB | Total | |
|---|---|---|---|---|---|---|---|---|---|---|
| Dehydrotomatidine | 1.0000000 | 0.4684205 | -0.1264388 | -0.1813027 | -0.0416145 | -0.2197497 | -0.1416577 | -0.1963224 | -0.1450557 | -0.2113658 |
| Tomatidine | 0.4684205 | 1.0000000 | -0.1667087 | -0.0642947 | 0.4433877 | -0.6276822 | -0.7019078 | -0.2838328 | -0.4355407 | -0.2204046 |
| TotalDehydrotomatine | -0.1264388 | -0.1667087 | 1.0000000 | 0.9289992 | 0.4131378 | 0.6357718 | 0.4620495 | 0.7170347 | 0.5355441 | 0.9015676 |
| Tomatine | -0.1813027 | -0.0642947 | 0.9289992 | 1.0000000 | 0.4899490 | 0.5716836 | 0.2772481 | 0.5985033 | 0.3644665 | 0.8552038 |
| TotalHydroxytomatine | -0.0416145 | 0.4433877 | 0.4131378 | 0.4899490 | 1.0000000 | -0.2258674 | -0.3151714 | 0.4508818 | 0.0261019 | 0.5243611 |
| TotalAcetoxytomatine | -0.2197497 | -0.6276822 | 0.6357718 | 0.5716836 | -0.2258674 | 1.0000000 | 0.8374333 | 0.4971272 | 0.5903021 | 0.6082227 |
| DehydrolycoperosideFGdehydroesculeosideA | -0.1416577 | -0.7019078 | 0.4620495 | 0.2772481 | -0.3151714 | 0.8374333 | 1.0000000 | 0.6382313 | 0.7746924 | 0.5540462 |
| TotalLycoperosideFGEsculeosideA | -0.1963224 | -0.2838328 | 0.7170347 | 0.5985033 | 0.4508818 | 0.4971272 | 0.6382313 | 1.0000000 | 0.7581278 | 0.9244855 |
| TotalEsculeosideB | -0.1450557 | -0.4355407 | 0.5355441 | 0.3644665 | 0.0261019 | 0.5903021 | 0.7746924 | 0.7581278 | 1.0000000 | 0.6777464 |
| Total | -0.2113658 | -0.2204046 | 0.9015676 | 0.8552038 | 0.5243611 | 0.6082227 | 0.5540462 | 0.9244855 | 0.6777464 | 1.0000000 |
# run cor.mtest to get pvalues and CI for each pair of inputs
sums_cor_mtest_cultproc <- cor.mtest(Alkaloids_sums_corr_matrix_cultproc,
conf.level = 0.95)
# save the pvalue matrix
sums_pval_matrix_cultproc <- sums_cor_mtest_cultproc$p
colnames(Alkaloids_sums_corr_matrix_cultproc) <- axis_labels_totals %>% str_wrap(width = 24)
rownames(Alkaloids_sums_corr_matrix_cultproc) <- axis_labels_totals %>% str_wrap(width = 24)
Create corrplot
corrplot_sum_cultproc <- corrplot(Alkaloids_sums_corr_matrix_cultproc,
method = "circle",
p.mat = sums_pval_matrix_cultproc,
insig = "label_sig",
type = "upper",
sig.level = c(.001, .01, .05),
outline = TRUE,
pch.cex = 1, # size of asterisks
pch.col = "white", # color of asterisks
tl.cex= 1, # size of axis text
tl.col= "black", # color of axis text
title = "Cultivated Processing")
corrplot_sum_cultproc
## Dehydrotomatidine Tomatidine
## Dehydrotomatidine 1.00000000 0.46842045
## Tomatidine 0.46842045 1.00000000
## Dehydrotomatine -0.12643880 -0.16670867
## Alpha-Tomatine -0.18130266 -0.06429471
## Hydroxytomatidine -0.04161454 0.44338766
## Acetoxytomatidine -0.21974974 -0.62768221
## Dehydrolycoperoside F/G/\nDehydroesculeoside A -0.14165773 -0.70190780
## Lycoperoside F/G/\nEsculeoside A -0.19632237 -0.28383284
## Escueloside B -0.14505574 -0.43554073
## Total SteroidalAlkaloids -0.21136578 -0.22040458
## Dehydrotomatine Alpha-Tomatine
## Dehydrotomatidine -0.1264388 -0.18130266
## Tomatidine -0.1667087 -0.06429471
## Dehydrotomatine 1.0000000 0.92899921
## Alpha-Tomatine 0.9289992 1.00000000
## Hydroxytomatidine 0.4131378 0.48994899
## Acetoxytomatidine 0.6357718 0.57168360
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.4620495 0.27724810
## Lycoperoside F/G/\nEsculeoside A 0.7170347 0.59850327
## Escueloside B 0.5355441 0.36446652
## Total SteroidalAlkaloids 0.9015676 0.85520381
## Hydroxytomatidine
## Dehydrotomatidine -0.04161454
## Tomatidine 0.44338766
## Dehydrotomatine 0.41313777
## Alpha-Tomatine 0.48994899
## Hydroxytomatidine 1.00000000
## Acetoxytomatidine -0.22586735
## Dehydrolycoperoside F/G/\nDehydroesculeoside A -0.31517144
## Lycoperoside F/G/\nEsculeoside A 0.45088181
## Escueloside B 0.02610185
## Total SteroidalAlkaloids 0.52436112
## Acetoxytomatidine
## Dehydrotomatidine -0.2197497
## Tomatidine -0.6276822
## Dehydrotomatine 0.6357718
## Alpha-Tomatine 0.5716836
## Hydroxytomatidine -0.2258674
## Acetoxytomatidine 1.0000000
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.8374333
## Lycoperoside F/G/\nEsculeoside A 0.4971272
## Escueloside B 0.5903021
## Total SteroidalAlkaloids 0.6082227
## Dehydrolycoperoside F/G/\nDehydroesculeoside A
## Dehydrotomatidine -0.1416577
## Tomatidine -0.7019078
## Dehydrotomatine 0.4620495
## Alpha-Tomatine 0.2772481
## Hydroxytomatidine -0.3151714
## Acetoxytomatidine 0.8374333
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 1.0000000
## Lycoperoside F/G/\nEsculeoside A 0.6382313
## Escueloside B 0.7746924
## Total SteroidalAlkaloids 0.5540462
## Lycoperoside F/G/\nEsculeoside A
## Dehydrotomatidine -0.1963224
## Tomatidine -0.2838328
## Dehydrotomatine 0.7170347
## Alpha-Tomatine 0.5985033
## Hydroxytomatidine 0.4508818
## Acetoxytomatidine 0.4971272
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.6382313
## Lycoperoside F/G/\nEsculeoside A 1.0000000
## Escueloside B 0.7581278
## Total SteroidalAlkaloids 0.9244855
## Escueloside B
## Dehydrotomatidine -0.14505574
## Tomatidine -0.43554073
## Dehydrotomatine 0.53554407
## Alpha-Tomatine 0.36446652
## Hydroxytomatidine 0.02610185
## Acetoxytomatidine 0.59030213
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.77469236
## Lycoperoside F/G/\nEsculeoside A 0.75812782
## Escueloside B 1.00000000
## Total SteroidalAlkaloids 0.67774645
## Total SteroidalAlkaloids
## Dehydrotomatidine -0.2113658
## Tomatidine -0.2204046
## Dehydrotomatine 0.9015676
## Alpha-Tomatine 0.8552038
## Hydroxytomatidine 0.5243611
## Acetoxytomatidine 0.6082227
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.5540462
## Lycoperoside F/G/\nEsculeoside A 0.9244855
## Escueloside B 0.6777464
## Total SteroidalAlkaloids 1.0000000
Alkaloids_LSmeans_sums_corr_cultcherry <- Alkaloids_LSmeans_sums_corr %>%
filter(Class == "Cultivated Cherry")
head(Alkaloids_LSmeans_sums_corr_cultcherry)
## # A tibble: 6 x 12
## Genotype Class Dehydrotomatidi… Tomatidine TotalDehydrotom… Tomatine
## <chr> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 Gold Ba… Cult… -0.0000272 -0.0000886 -0.00779 -0.115
## 2 NC2C Cult… -0.0000272 -0.0000291 0.0254 0.348
## 3 OR11 Cult… 0.000933 0.00178 -0.00336 -0.0191
## 4 Princip… Cult… -0.00000245 0.000198 0.0369 0.552
## 5 Tainan Cult… -0.0000272 -0.000165 0.0519 0.439
## 6 VFNT Ch… Cult… 0.0000451 0.00267 0.0237 0.509
## # … with 6 more variables: TotalHydroxytomatine <dbl>,
## # TotalAcetoxytomatine <dbl>, DehydrolycoperosideFGdehydroesculeosideA <dbl>,
## # TotalLycoperosideFGEsculeosideA <dbl>, TotalEsculeosideB <dbl>, Total <dbl>
Alkaloids_sums_corr_matrix_cultcherry <- cor(Alkaloids_LSmeans_sums_corr_cultcherry[,3:ncol(Alkaloids_LSmeans_sums_corr_cultcherry)],
method = "pearson")
kable(Alkaloids_sums_corr_matrix_cultcherry)
| Dehydrotomatidine | Tomatidine | TotalDehydrotomatine | Tomatine | TotalHydroxytomatine | TotalAcetoxytomatine | DehydrolycoperosideFGdehydroesculeosideA | TotalLycoperosideFGEsculeosideA | TotalEsculeosideB | Total | |
|---|---|---|---|---|---|---|---|---|---|---|
| Dehydrotomatidine | 1.0000000 | 0.4919742 | -0.5167106 | -0.4948699 | -0.5302301 | -0.4550694 | -0.3754987 | -0.5016173 | -0.5425818 | -0.5231387 |
| Tomatidine | 0.4919742 | 1.0000000 | -0.2606036 | 0.0677192 | -0.1611858 | -0.0777542 | -0.4705056 | -0.4475548 | -0.4560050 | -0.3867608 |
| TotalDehydrotomatine | -0.5167106 | -0.2606036 | 1.0000000 | 0.8827630 | 0.9633704 | 0.9819199 | 0.5292670 | 0.9397001 | 0.7712606 | 0.9671888 |
| Tomatine | -0.4948699 | 0.0677192 | 0.8827630 | 1.0000000 | 0.9559698 | 0.9182527 | 0.4163367 | 0.7415641 | 0.7689791 | 0.8163084 |
| TotalHydroxytomatine | -0.5302301 | -0.1611858 | 0.9633704 | 0.9559698 | 1.0000000 | 0.9562286 | 0.4278644 | 0.8427625 | 0.8073498 | 0.8997845 |
| TotalAcetoxytomatine | -0.4550694 | -0.0777542 | 0.9819199 | 0.9182527 | 0.9562286 | 1.0000000 | 0.4615349 | 0.8875976 | 0.6959946 | 0.9253314 |
| DehydrolycoperosideFGdehydroesculeosideA | -0.3754987 | -0.4705056 | 0.5292670 | 0.4163367 | 0.4278644 | 0.4615349 | 1.0000000 | 0.7583459 | 0.7662476 | 0.7228368 |
| TotalLycoperosideFGEsculeosideA | -0.5016173 | -0.4475548 | 0.9397001 | 0.7415641 | 0.8427625 | 0.8875976 | 0.7583459 | 1.0000000 | 0.8155910 | 0.9924880 |
| TotalEsculeosideB | -0.5425818 | -0.4560050 | 0.7712606 | 0.7689791 | 0.8073498 | 0.6959946 | 0.7662476 | 0.8155910 | 1.0000000 | 0.8467805 |
| Total | -0.5231387 | -0.3867608 | 0.9671888 | 0.8163084 | 0.8997845 | 0.9253314 | 0.7228368 | 0.9924880 | 0.8467805 | 1.0000000 |
# run cor.mtest to get pvalues and CI for each pair of inputs
sums_cor_mtest_cultcherry <- cor.mtest(Alkaloids_sums_corr_matrix_cultcherry,
conf.level = 0.95)
# save the pvalue matrix
sums_pval_matrix_cultcherry <- sums_cor_mtest_cultcherry$p
colnames(Alkaloids_sums_corr_matrix_cultcherry) <- axis_labels_totals %>% str_wrap(width = 24)
rownames(Alkaloids_sums_corr_matrix_cultcherry) <- axis_labels_totals %>% str_wrap(width = 24)
Create corrplot
corrplot_sum_cultcherry <- corrplot(Alkaloids_sums_corr_matrix_cultcherry,
method = "circle",
p.mat = sums_pval_matrix_cultcherry,
insig = "label_sig",
type = "upper",
sig.level = c(.001, .01, .05),
outline = TRUE,
pch.cex = 1, # size of asterisks
pch.col = "white", # color of asterisks
tl.cex= 1, # size of axis text
tl.col= "black", # color of axis text
title = "Cultivated Cherry")
corrplot_sum_cultcherry
## Dehydrotomatidine Tomatidine
## Dehydrotomatidine 1.0000000 0.49197420
## Tomatidine 0.4919742 1.00000000
## Dehydrotomatine -0.5167106 -0.26060360
## Alpha-Tomatine -0.4948699 0.06771920
## Hydroxytomatidine -0.5302301 -0.16118584
## Acetoxytomatidine -0.4550694 -0.07775423
## Dehydrolycoperoside F/G/\nDehydroesculeoside A -0.3754987 -0.47050557
## Lycoperoside F/G/\nEsculeoside A -0.5016173 -0.44755485
## Escueloside B -0.5425818 -0.45600496
## Total SteroidalAlkaloids -0.5231387 -0.38676082
## Dehydrotomatine Alpha-Tomatine
## Dehydrotomatidine -0.5167106 -0.4948699
## Tomatidine -0.2606036 0.0677192
## Dehydrotomatine 1.0000000 0.8827630
## Alpha-Tomatine 0.8827630 1.0000000
## Hydroxytomatidine 0.9633704 0.9559698
## Acetoxytomatidine 0.9819199 0.9182527
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.5292670 0.4163367
## Lycoperoside F/G/\nEsculeoside A 0.9397001 0.7415641
## Escueloside B 0.7712606 0.7689791
## Total SteroidalAlkaloids 0.9671888 0.8163084
## Hydroxytomatidine
## Dehydrotomatidine -0.5302301
## Tomatidine -0.1611858
## Dehydrotomatine 0.9633704
## Alpha-Tomatine 0.9559698
## Hydroxytomatidine 1.0000000
## Acetoxytomatidine 0.9562286
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.4278644
## Lycoperoside F/G/\nEsculeoside A 0.8427625
## Escueloside B 0.8073498
## Total SteroidalAlkaloids 0.8997845
## Acetoxytomatidine
## Dehydrotomatidine -0.45506939
## Tomatidine -0.07775423
## Dehydrotomatine 0.98191993
## Alpha-Tomatine 0.91825269
## Hydroxytomatidine 0.95622863
## Acetoxytomatidine 1.00000000
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.46153485
## Lycoperoside F/G/\nEsculeoside A 0.88759756
## Escueloside B 0.69599464
## Total SteroidalAlkaloids 0.92533139
## Dehydrolycoperoside F/G/\nDehydroesculeoside A
## Dehydrotomatidine -0.3754987
## Tomatidine -0.4705056
## Dehydrotomatine 0.5292670
## Alpha-Tomatine 0.4163367
## Hydroxytomatidine 0.4278644
## Acetoxytomatidine 0.4615349
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 1.0000000
## Lycoperoside F/G/\nEsculeoside A 0.7583459
## Escueloside B 0.7662476
## Total SteroidalAlkaloids 0.7228368
## Lycoperoside F/G/\nEsculeoside A
## Dehydrotomatidine -0.5016173
## Tomatidine -0.4475548
## Dehydrotomatine 0.9397001
## Alpha-Tomatine 0.7415641
## Hydroxytomatidine 0.8427625
## Acetoxytomatidine 0.8875976
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.7583459
## Lycoperoside F/G/\nEsculeoside A 1.0000000
## Escueloside B 0.8155910
## Total SteroidalAlkaloids 0.9924880
## Escueloside B
## Dehydrotomatidine -0.5425818
## Tomatidine -0.4560050
## Dehydrotomatine 0.7712606
## Alpha-Tomatine 0.7689791
## Hydroxytomatidine 0.8073498
## Acetoxytomatidine 0.6959946
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.7662476
## Lycoperoside F/G/\nEsculeoside A 0.8155910
## Escueloside B 1.0000000
## Total SteroidalAlkaloids 0.8467805
## Total SteroidalAlkaloids
## Dehydrotomatidine -0.5231387
## Tomatidine -0.3867608
## Dehydrotomatine 0.9671888
## Alpha-Tomatine 0.8163084
## Hydroxytomatidine 0.8997845
## Acetoxytomatidine 0.9253314
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.7228368
## Lycoperoside F/G/\nEsculeoside A 0.9924880
## Escueloside B 0.8467805
## Total SteroidalAlkaloids 1.0000000
Alkaloids_LSmeans_sums_corr_hybrid <- Alkaloids_LSmeans_sums_corr %>%
filter(Class == "Wide Cross Hybrid")
head(Alkaloids_LSmeans_sums_corr_hybrid)
## # A tibble: 6 x 12
## Genotype Class Dehydrotomatidi… Tomatidine TotalDehydrotom… Tomatine
## <chr> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 FG16-511 Wide… 0.000507 1.96e-3 0.00121 -0.0106
## 2 FG16-513 Wide… 0.0000961 3.89e-3 0.0519 0.771
## 3 FG16-515 Wide… -0.0000272 -2.58e-4 0.0127 0.210
## 4 FG16-517 Wide… -0.0000272 -5.20e-5 0.0673 0.974
## 5 FG16-519 Wide… 0.0000148 -9.82e-6 0.0222 0.290
## 6 FG16-521 Wide… -0.0000272 4.80e-3 0.0524 0.405
## # … with 6 more variables: TotalHydroxytomatine <dbl>,
## # TotalAcetoxytomatine <dbl>, DehydrolycoperosideFGdehydroesculeosideA <dbl>,
## # TotalLycoperosideFGEsculeosideA <dbl>, TotalEsculeosideB <dbl>, Total <dbl>
Alkaloids_sums_corr_matrix_hybrid <- cor(Alkaloids_LSmeans_sums_corr_hybrid[,3:ncol(Alkaloids_LSmeans_sums_corr_hybrid)],
method = "pearson")
kable(Alkaloids_sums_corr_matrix_hybrid)
| Dehydrotomatidine | Tomatidine | TotalDehydrotomatine | Tomatine | TotalHydroxytomatine | TotalAcetoxytomatine | DehydrolycoperosideFGdehydroesculeosideA | TotalLycoperosideFGEsculeosideA | TotalEsculeosideB | Total | |
|---|---|---|---|---|---|---|---|---|---|---|
| Dehydrotomatidine | 1.0000000 | 0.1397014 | -0.5893117 | -0.5344343 | -0.2147759 | -0.6632852 | 0.7878836 | 0.2668297 | 0.0943624 | 0.1025021 |
| Tomatidine | 0.1397014 | 1.0000000 | 0.3158726 | 0.0664688 | 0.7721989 | 0.3694851 | 0.1775846 | 0.3485307 | -0.2488696 | 0.3588483 |
| TotalDehydrotomatine | -0.5893117 | 0.3158726 | 1.0000000 | 0.9249773 | 0.7340561 | 0.8120865 | -0.3194375 | 0.5099942 | 0.2345872 | 0.6417176 |
| Tomatine | -0.5344343 | 0.0664688 | 0.9249773 | 1.0000000 | 0.4502890 | 0.5629749 | -0.4346433 | 0.3993385 | 0.1642010 | 0.5161662 |
| TotalHydroxytomatine | -0.2147759 | 0.7721989 | 0.7340561 | 0.4502890 | 1.0000000 | 0.8294138 | 0.1703831 | 0.6755995 | 0.2742662 | 0.7488283 |
| TotalAcetoxytomatine | -0.6632852 | 0.3694851 | 0.8120865 | 0.5629749 | 0.8294138 | 1.0000000 | -0.1566234 | 0.4558879 | 0.3751345 | 0.5872678 |
| DehydrolycoperosideFGdehydroesculeosideA | 0.7878836 | 0.1775846 | -0.3194375 | -0.4346433 | 0.1703831 | -0.1566234 | 1.0000000 | 0.6273648 | 0.5988857 | 0.5030305 |
| TotalLycoperosideFGEsculeosideA | 0.2668297 | 0.3485307 | 0.5099942 | 0.3993385 | 0.6755995 | 0.4558879 | 0.6273648 | 1.0000000 | 0.7486009 | 0.9852850 |
| TotalEsculeosideB | 0.0943624 | -0.2488696 | 0.2345872 | 0.1642010 | 0.2742662 | 0.3751345 | 0.5988857 | 0.7486009 | 1.0000000 | 0.7357394 |
| Total | 0.1025021 | 0.3588483 | 0.6417176 | 0.5161662 | 0.7488283 | 0.5872678 | 0.5030305 | 0.9852850 | 0.7357394 | 1.0000000 |
# run cor.mtest to get pvalues and CI for each pair of inputs
sums_cor_mtest_hybrid <- cor.mtest(Alkaloids_sums_corr_matrix_hybrid,
conf.level = 0.95)
# save the pvalue matrix
sums_pval_matrix_hybrid <- sums_cor_mtest_hybrid$p
colnames(Alkaloids_sums_corr_matrix_hybrid) <- axis_labels_totals %>% str_wrap(width = 24)
rownames(Alkaloids_sums_corr_matrix_hybrid) <- axis_labels_totals %>% str_wrap(width = 24)
Create corrplot
corrplot_sum_hybrid <- corrplot(Alkaloids_sums_corr_matrix_hybrid,
method = "circle",
p.mat = sums_pval_matrix_hybrid,
insig = "label_sig",
type = "upper",
sig.level = c(.001, .01, .05),
outline = TRUE,
pch.cex = 1, # size of asterisks
pch.col = "white", # color of asterisks
tl.cex= 1, # size of axis text
tl.col= "black", # color of axis text
title = "Wide Cross Hybrid")
corrplot_sum_hybrid
## Dehydrotomatidine Tomatidine
## Dehydrotomatidine 1.00000000 0.13970142
## Tomatidine 0.13970142 1.00000000
## Dehydrotomatine -0.58931174 0.31587258
## Alpha-Tomatine -0.53443425 0.06646882
## Hydroxytomatidine -0.21477593 0.77219888
## Acetoxytomatidine -0.66328522 0.36948508
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.78788362 0.17758464
## Lycoperoside F/G/\nEsculeoside A 0.26682968 0.34853067
## Escueloside B 0.09436237 -0.24886956
## Total SteroidalAlkaloids 0.10250211 0.35884828
## Dehydrotomatine Alpha-Tomatine
## Dehydrotomatidine -0.5893117 -0.53443425
## Tomatidine 0.3158726 0.06646882
## Dehydrotomatine 1.0000000 0.92497732
## Alpha-Tomatine 0.9249773 1.00000000
## Hydroxytomatidine 0.7340561 0.45028899
## Acetoxytomatidine 0.8120865 0.56297490
## Dehydrolycoperoside F/G/\nDehydroesculeoside A -0.3194375 -0.43464328
## Lycoperoside F/G/\nEsculeoside A 0.5099942 0.39933852
## Escueloside B 0.2345872 0.16420099
## Total SteroidalAlkaloids 0.6417176 0.51616624
## Hydroxytomatidine
## Dehydrotomatidine -0.2147759
## Tomatidine 0.7721989
## Dehydrotomatine 0.7340561
## Alpha-Tomatine 0.4502890
## Hydroxytomatidine 1.0000000
## Acetoxytomatidine 0.8294138
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.1703831
## Lycoperoside F/G/\nEsculeoside A 0.6755995
## Escueloside B 0.2742662
## Total SteroidalAlkaloids 0.7488283
## Acetoxytomatidine
## Dehydrotomatidine -0.6632852
## Tomatidine 0.3694851
## Dehydrotomatine 0.8120865
## Alpha-Tomatine 0.5629749
## Hydroxytomatidine 0.8294138
## Acetoxytomatidine 1.0000000
## Dehydrolycoperoside F/G/\nDehydroesculeoside A -0.1566234
## Lycoperoside F/G/\nEsculeoside A 0.4558879
## Escueloside B 0.3751345
## Total SteroidalAlkaloids 0.5872678
## Dehydrolycoperoside F/G/\nDehydroesculeoside A
## Dehydrotomatidine 0.7878836
## Tomatidine 0.1775846
## Dehydrotomatine -0.3194375
## Alpha-Tomatine -0.4346433
## Hydroxytomatidine 0.1703831
## Acetoxytomatidine -0.1566234
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 1.0000000
## Lycoperoside F/G/\nEsculeoside A 0.6273648
## Escueloside B 0.5988857
## Total SteroidalAlkaloids 0.5030305
## Lycoperoside F/G/\nEsculeoside A
## Dehydrotomatidine 0.2668297
## Tomatidine 0.3485307
## Dehydrotomatine 0.5099942
## Alpha-Tomatine 0.3993385
## Hydroxytomatidine 0.6755995
## Acetoxytomatidine 0.4558879
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.6273648
## Lycoperoside F/G/\nEsculeoside A 1.0000000
## Escueloside B 0.7486009
## Total SteroidalAlkaloids 0.9852850
## Escueloside B
## Dehydrotomatidine 0.09436237
## Tomatidine -0.24886956
## Dehydrotomatine 0.23458717
## Alpha-Tomatine 0.16420099
## Hydroxytomatidine 0.27426621
## Acetoxytomatidine 0.37513451
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.59888569
## Lycoperoside F/G/\nEsculeoside A 0.74860094
## Escueloside B 1.00000000
## Total SteroidalAlkaloids 0.73573942
## Total SteroidalAlkaloids
## Dehydrotomatidine 0.1025021
## Tomatidine 0.3588483
## Dehydrotomatine 0.6417176
## Alpha-Tomatine 0.5161662
## Hydroxytomatidine 0.7488283
## Acetoxytomatidine 0.5872678
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.5030305
## Lycoperoside F/G/\nEsculeoside A 0.9852850
## Escueloside B 0.7357394
## Total SteroidalAlkaloids 1.0000000
Alkaloids_LSmeans_sums_corr_wildcherry <- Alkaloids_LSmeans_sums_corr %>%
filter(Class == "Wild Cherry")
head(Alkaloids_LSmeans_sums_corr_wildcherry)
## # A tibble: 6 x 12
## Genotype Class Dehydrotomatidi… Tomatidine TotalDehydrotom… Tomatine
## <chr> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 LA1314 Wild… 0.0000947 0.00285 0.115 1.04
## 2 LA1338 Wild… 0.000756 0.0298 0.183 2.01
## 3 LA1464 Wild… 0.0000961 0.00397 0.225 1.94
## 4 LA1512 Wild… -0.0000111 0.00244 0.0166 0.196
## 5 LA1542 Wild… 0.0000344 0.0147 0.101 1.19
## 6 LA1549 Wild… -0.000000590 0.000120 0.0581 0.169
## # … with 6 more variables: TotalHydroxytomatine <dbl>,
## # TotalAcetoxytomatine <dbl>, DehydrolycoperosideFGdehydroesculeosideA <dbl>,
## # TotalLycoperosideFGEsculeosideA <dbl>, TotalEsculeosideB <dbl>, Total <dbl>
Alkaloids_sums_corr_matrix_wildcherry <- cor(Alkaloids_LSmeans_sums_corr_wildcherry[,3:ncol(Alkaloids_LSmeans_sums_corr_wildcherry)],
method = "pearson")
kable(Alkaloids_sums_corr_matrix_wildcherry)
| Dehydrotomatidine | Tomatidine | TotalDehydrotomatine | Tomatine | TotalHydroxytomatine | TotalAcetoxytomatine | DehydrolycoperosideFGdehydroesculeosideA | TotalLycoperosideFGEsculeosideA | TotalEsculeosideB | Total | |
|---|---|---|---|---|---|---|---|---|---|---|
| Dehydrotomatidine | 1.0000000 | 0.1653183 | 0.0809563 | 0.1030620 | 0.1820587 | 0.0983976 | -0.1708305 | -0.0682854 | 0.2253353 | 0.1779811 |
| Tomatidine | 0.1653183 | 1.0000000 | 0.5683517 | 0.5268467 | 0.0554669 | -0.0139936 | -0.3208071 | -0.3313171 | -0.2306840 | 0.1500363 |
| TotalDehydrotomatine | 0.0809563 | 0.5683517 | 1.0000000 | 0.8935611 | 0.0738361 | 0.3051755 | -0.5881332 | -0.6409702 | -0.5363556 | 0.5425229 |
| Tomatine | 0.1030620 | 0.5268467 | 0.8935611 | 1.0000000 | -0.0686327 | -0.0255713 | -0.4746418 | -0.5057519 | -0.4120394 | 0.2859454 |
| TotalHydroxytomatine | 0.1820587 | 0.0554669 | 0.0738361 | -0.0686327 | 1.0000000 | 0.3925270 | -0.3112422 | -0.3440016 | -0.2829034 | 0.4607150 |
| TotalAcetoxytomatine | 0.0983976 | -0.0139936 | 0.3051755 | -0.0255713 | 0.3925270 | 1.0000000 | -0.4326207 | -0.4734814 | -0.3834099 | 0.8931440 |
| DehydrolycoperosideFGdehydroesculeosideA | -0.1708305 | -0.3208071 | -0.5881332 | -0.4746418 | -0.3112422 | -0.4326207 | 1.0000000 | 0.8900323 | 0.6923486 | -0.3908422 |
| TotalLycoperosideFGEsculeosideA | -0.0682854 | -0.3313171 | -0.6409702 | -0.5057519 | -0.3440016 | -0.4734814 | 0.8900323 | 1.0000000 | 0.8423234 | -0.4103081 |
| TotalEsculeosideB | 0.2253353 | -0.2306840 | -0.5363556 | -0.4120394 | -0.2829034 | -0.3834099 | 0.6923486 | 0.8423234 | 1.0000000 | -0.3132890 |
| Total | 0.1779811 | 0.1500363 | 0.5425229 | 0.2859454 | 0.4607150 | 0.8931440 | -0.3908422 | -0.4103081 | -0.3132890 | 1.0000000 |
# run cor.mtest to get pvalues and CI for each pair of inputs
sums_cor_mtest_wildcherry <- cor.mtest(Alkaloids_sums_corr_matrix_wildcherry,
conf.level = 0.95)
# save the pvalue matrix
sums_pval_matrix_wildcherry <- sums_cor_mtest_wildcherry$p
colnames(Alkaloids_sums_corr_matrix_wildcherry) <- axis_labels_totals %>% str_wrap(width = 24)
rownames(Alkaloids_sums_corr_matrix_wildcherry) <- axis_labels_totals %>% str_wrap(width = 24)
Create corrplot
corrplot_sum_wildcherry <- corrplot(Alkaloids_sums_corr_matrix_wildcherry,
method = "circle",
p.mat = sums_pval_matrix_wildcherry,
insig = "label_sig",
type = "upper",
sig.level = c(.001, .01, .05),
outline = TRUE,
pch.cex = 1, # size of asterisks
pch.col = "white", # color of asterisks
tl.cex= 1, # size of axis text
tl.col= "black", # color of axis text
title = "Wild Cherry")
corrplot_sum_wildcherry
## Dehydrotomatidine Tomatidine
## Dehydrotomatidine 1.00000000 0.16531831
## Tomatidine 0.16531831 1.00000000
## Dehydrotomatine 0.08095631 0.56835168
## Alpha-Tomatine 0.10306196 0.52684670
## Hydroxytomatidine 0.18205873 0.05546689
## Acetoxytomatidine 0.09839757 -0.01399359
## Dehydrolycoperoside F/G/\nDehydroesculeoside A -0.17083053 -0.32080708
## Lycoperoside F/G/\nEsculeoside A -0.06828543 -0.33131714
## Escueloside B 0.22533530 -0.23068400
## Total SteroidalAlkaloids 0.17798110 0.15003628
## Dehydrotomatine Alpha-Tomatine
## Dehydrotomatidine 0.08095631 0.10306196
## Tomatidine 0.56835168 0.52684670
## Dehydrotomatine 1.00000000 0.89356113
## Alpha-Tomatine 0.89356113 1.00000000
## Hydroxytomatidine 0.07383606 -0.06863275
## Acetoxytomatidine 0.30517548 -0.02557127
## Dehydrolycoperoside F/G/\nDehydroesculeoside A -0.58813319 -0.47464183
## Lycoperoside F/G/\nEsculeoside A -0.64097016 -0.50575195
## Escueloside B -0.53635564 -0.41203939
## Total SteroidalAlkaloids 0.54252288 0.28594543
## Hydroxytomatidine
## Dehydrotomatidine 0.18205873
## Tomatidine 0.05546689
## Dehydrotomatine 0.07383606
## Alpha-Tomatine -0.06863275
## Hydroxytomatidine 1.00000000
## Acetoxytomatidine 0.39252700
## Dehydrolycoperoside F/G/\nDehydroesculeoside A -0.31124225
## Lycoperoside F/G/\nEsculeoside A -0.34400158
## Escueloside B -0.28290340
## Total SteroidalAlkaloids 0.46071504
## Acetoxytomatidine
## Dehydrotomatidine 0.09839757
## Tomatidine -0.01399359
## Dehydrotomatine 0.30517548
## Alpha-Tomatine -0.02557127
## Hydroxytomatidine 0.39252700
## Acetoxytomatidine 1.00000000
## Dehydrolycoperoside F/G/\nDehydroesculeoside A -0.43262069
## Lycoperoside F/G/\nEsculeoside A -0.47348143
## Escueloside B -0.38340995
## Total SteroidalAlkaloids 0.89314401
## Dehydrolycoperoside F/G/\nDehydroesculeoside A
## Dehydrotomatidine -0.1708305
## Tomatidine -0.3208071
## Dehydrotomatine -0.5881332
## Alpha-Tomatine -0.4746418
## Hydroxytomatidine -0.3112422
## Acetoxytomatidine -0.4326207
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 1.0000000
## Lycoperoside F/G/\nEsculeoside A 0.8900323
## Escueloside B 0.6923486
## Total SteroidalAlkaloids -0.3908422
## Lycoperoside F/G/\nEsculeoside A
## Dehydrotomatidine -0.06828543
## Tomatidine -0.33131714
## Dehydrotomatine -0.64097016
## Alpha-Tomatine -0.50575195
## Hydroxytomatidine -0.34400158
## Acetoxytomatidine -0.47348143
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.89003226
## Lycoperoside F/G/\nEsculeoside A 1.00000000
## Escueloside B 0.84232341
## Total SteroidalAlkaloids -0.41030805
## Escueloside B
## Dehydrotomatidine 0.2253353
## Tomatidine -0.2306840
## Dehydrotomatine -0.5363556
## Alpha-Tomatine -0.4120394
## Hydroxytomatidine -0.2829034
## Acetoxytomatidine -0.3834099
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.6923486
## Lycoperoside F/G/\nEsculeoside A 0.8423234
## Escueloside B 1.0000000
## Total SteroidalAlkaloids -0.3132890
## Total SteroidalAlkaloids
## Dehydrotomatidine 0.1779811
## Tomatidine 0.1500363
## Dehydrotomatine 0.5425229
## Alpha-Tomatine 0.2859454
## Hydroxytomatidine 0.4607150
## Acetoxytomatidine 0.8931440
## Dehydrolycoperoside F/G/\nDehydroesculeoside A -0.3908422
## Lycoperoside F/G/\nEsculeoside A -0.4103081
## Escueloside B -0.3132890
## Total SteroidalAlkaloids 1.0000000
Alkaloids_LSmeans_sums_corr_pimp <- Alkaloids_LSmeans_sums_corr %>%
filter(Class == "S. pimpinellifolium")
head(Alkaloids_LSmeans_sums_corr_pimp)
## # A tibble: 6 x 12
## Genotype Class Dehydrotomatidi… Tomatidine TotalDehydrotom… Tomatine
## <chr> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 LA0373 S. p… 0.00000677 0.0157 0.0164 0.448
## 2 LA0400 S. p… 0.0000788 0.00221 0.127 1.09
## 3 LA0411 S. p… 0.00388 0.0148 0.0122 0.0702
## 4 LA0722 S. p… 0.0000675 0.0132 0.0286 0.823
## 5 LA1237 S. p… 0.0000433 0.00550 0.0275 0.202
## 6 LA1261 S. p… 0.000193 0.00223 0.0722 0.602
## # … with 6 more variables: TotalHydroxytomatine <dbl>,
## # TotalAcetoxytomatine <dbl>, DehydrolycoperosideFGdehydroesculeosideA <dbl>,
## # TotalLycoperosideFGEsculeosideA <dbl>, TotalEsculeosideB <dbl>, Total <dbl>
Alkaloids_sums_corr_matrix_pimp <-
cor(Alkaloids_LSmeans_sums_corr_pimp[,3:ncol(Alkaloids_LSmeans_sums_corr_pimp)],
method = "pearson")
kable(Alkaloids_sums_corr_matrix_pimp)
| Dehydrotomatidine | Tomatidine | TotalDehydrotomatine | Tomatine | TotalHydroxytomatine | TotalAcetoxytomatine | DehydrolycoperosideFGdehydroesculeosideA | TotalLycoperosideFGEsculeosideA | TotalEsculeosideB | Total | |
|---|---|---|---|---|---|---|---|---|---|---|
| Dehydrotomatidine | 1.0000000 | 0.1954352 | -0.1589147 | -0.1786063 | -0.2006380 | -0.1042024 | -0.1943138 | -0.1920589 | -0.2610654 | -0.2107423 |
| Tomatidine | 0.1954352 | 1.0000000 | 0.1127297 | 0.3890450 | 0.1091375 | -0.1196598 | 0.2248365 | 0.3521061 | 0.2745544 | 0.1713881 |
| TotalDehydrotomatine | -0.1589147 | 0.1127297 | 1.0000000 | 0.8873039 | 0.7349537 | 0.7276673 | 0.3562835 | 0.3485428 | -0.0967109 | 0.7596013 |
| Tomatine | -0.1786063 | 0.3890450 | 0.8873039 | 1.0000000 | 0.6434961 | 0.4733321 | 0.5100770 | 0.5057092 | 0.1105995 | 0.7012005 |
| TotalHydroxytomatine | -0.2006380 | 0.1091375 | 0.7349537 | 0.6434961 | 1.0000000 | 0.7724928 | 0.4573555 | 0.4838539 | 0.1788664 | 0.8755287 |
| TotalAcetoxytomatine | -0.1042024 | -0.1196598 | 0.7276673 | 0.4733321 | 0.7724928 | 1.0000000 | 0.0444011 | 0.0822551 | -0.1014073 | 0.7461320 |
| DehydrolycoperosideFGdehydroesculeosideA | -0.1943138 | 0.2248365 | 0.3562835 | 0.5100770 | 0.4573555 | 0.0444011 | 1.0000000 | 0.8983434 | 0.4450893 | 0.6346404 |
| TotalLycoperosideFGEsculeosideA | -0.1920589 | 0.3521061 | 0.3485428 | 0.5057092 | 0.4838539 | 0.0822551 | 0.8983434 | 1.0000000 | 0.6270869 | 0.7219874 |
| TotalEsculeosideB | -0.2610654 | 0.2745544 | -0.0967109 | 0.1105995 | 0.1788664 | -0.1014073 | 0.4450893 | 0.6270869 | 1.0000000 | 0.3526253 |
| Total | -0.2107423 | 0.1713881 | 0.7596013 | 0.7012005 | 0.8755287 | 0.7461320 | 0.6346404 | 0.7219874 | 0.3526253 | 1.0000000 |
# run cor.mtest to get pvalues and CI for each pair of inputs
sums_cor_mtest_pimp <- cor.mtest(Alkaloids_sums_corr_matrix_pimp,
conf.level = 0.95)
# save the pvalue matrix
sums_pval_matrix_pimp <- sums_cor_mtest_pimp$p
colnames(Alkaloids_sums_corr_matrix_pimp) <- axis_labels_totals %>% str_wrap(width = 24)
rownames(Alkaloids_sums_corr_matrix_pimp) <- axis_labels_totals %>% str_wrap(width = 24)
Create corrplot
corrplot_sum_pimp <- corrplot(Alkaloids_sums_corr_matrix_pimp,
method = "circle",
p.mat = sums_pval_matrix_pimp,
insig = "label_sig",
type = "upper",
sig.level = c(.001, .01, .05),
outline = TRUE,
pch.cex = 1, # size of asterisks
pch.col = "white", # color of asterisks
tl.cex= 1, # size of axis text
tl.col= "black", # color of axis text
title = "S. pimpinellifolium")
corrplot_sum_pimp
## Dehydrotomatidine Tomatidine
## Dehydrotomatidine 1.0000000 0.1954352
## Tomatidine 0.1954352 1.0000000
## Dehydrotomatine -0.1589147 0.1127297
## Alpha-Tomatine -0.1786063 0.3890450
## Hydroxytomatidine -0.2006380 0.1091375
## Acetoxytomatidine -0.1042024 -0.1196598
## Dehydrolycoperoside F/G/\nDehydroesculeoside A -0.1943138 0.2248365
## Lycoperoside F/G/\nEsculeoside A -0.1920589 0.3521061
## Escueloside B -0.2610654 0.2745544
## Total SteroidalAlkaloids -0.2107423 0.1713881
## Dehydrotomatine Alpha-Tomatine
## Dehydrotomatidine -0.1589147 -0.1786063
## Tomatidine 0.1127297 0.3890450
## Dehydrotomatine 1.0000000 0.8873039
## Alpha-Tomatine 0.8873039 1.0000000
## Hydroxytomatidine 0.7349537 0.6434961
## Acetoxytomatidine 0.7276673 0.4733321
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.3562835 0.5100770
## Lycoperoside F/G/\nEsculeoside A 0.3485428 0.5057092
## Escueloside B -0.0967109 0.1105995
## Total SteroidalAlkaloids 0.7596013 0.7012005
## Hydroxytomatidine
## Dehydrotomatidine -0.2006380
## Tomatidine 0.1091375
## Dehydrotomatine 0.7349537
## Alpha-Tomatine 0.6434961
## Hydroxytomatidine 1.0000000
## Acetoxytomatidine 0.7724928
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.4573555
## Lycoperoside F/G/\nEsculeoside A 0.4838539
## Escueloside B 0.1788664
## Total SteroidalAlkaloids 0.8755287
## Acetoxytomatidine
## Dehydrotomatidine -0.10420242
## Tomatidine -0.11965980
## Dehydrotomatine 0.72766735
## Alpha-Tomatine 0.47333209
## Hydroxytomatidine 0.77249278
## Acetoxytomatidine 1.00000000
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.04440112
## Lycoperoside F/G/\nEsculeoside A 0.08225513
## Escueloside B -0.10140730
## Total SteroidalAlkaloids 0.74613201
## Dehydrolycoperoside F/G/\nDehydroesculeoside A
## Dehydrotomatidine -0.19431383
## Tomatidine 0.22483653
## Dehydrotomatine 0.35628355
## Alpha-Tomatine 0.51007703
## Hydroxytomatidine 0.45735554
## Acetoxytomatidine 0.04440112
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 1.00000000
## Lycoperoside F/G/\nEsculeoside A 0.89834342
## Escueloside B 0.44508934
## Total SteroidalAlkaloids 0.63464045
## Lycoperoside F/G/\nEsculeoside A
## Dehydrotomatidine -0.19205889
## Tomatidine 0.35210614
## Dehydrotomatine 0.34854280
## Alpha-Tomatine 0.50570923
## Hydroxytomatidine 0.48385388
## Acetoxytomatidine 0.08225513
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.89834342
## Lycoperoside F/G/\nEsculeoside A 1.00000000
## Escueloside B 0.62708687
## Total SteroidalAlkaloids 0.72198744
## Escueloside B
## Dehydrotomatidine -0.2610654
## Tomatidine 0.2745544
## Dehydrotomatine -0.0967109
## Alpha-Tomatine 0.1105995
## Hydroxytomatidine 0.1788664
## Acetoxytomatidine -0.1014073
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.4450893
## Lycoperoside F/G/\nEsculeoside A 0.6270869
## Escueloside B 1.0000000
## Total SteroidalAlkaloids 0.3526253
## Total SteroidalAlkaloids
## Dehydrotomatidine -0.2107423
## Tomatidine 0.1713881
## Dehydrotomatine 0.7596013
## Alpha-Tomatine 0.7012005
## Hydroxytomatidine 0.8755287
## Acetoxytomatidine 0.7461320
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.6346404
## Lycoperoside F/G/\nEsculeoside A 0.7219874
## Escueloside B 0.3526253
## Total SteroidalAlkaloids 1.0000000
Alkaloids_allisomers_corr_matrix <- cor(Alkaloids_LSmeans_allisomers_corr[,3:ncol(Alkaloids_LSmeans_allisomers_corr)],
method = "pearson")
kable(Alkaloids_allisomers_corr_matrix)
| Dehydrotomatidine | Tomatidine | DehydrotomatineA1 | Dehydrotomatine2 | TotalDehydrotomatine | Tomatine | Hydroxytomatine1 | Hydroxytomatine2 | Hydroxytomatine3 | Hydroxytomatine4 | TotalHydroxytomatine | Acetoxytomatine1 | Acetoxytomatine2 | Acetoxytomatine3 | TotalAcetoxytomatine | DehydrolycoperosideFGdehydroesculeosideA | LycoperosideFGEsculeosideA1 | LycoperosideFGEsculeosideA2 | TotalLycoperosideFGEsculeosideA | EsculeosideB1 | EsculeosideB2 | EsculeosideB3 | TotalEsculeosideB | Total | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Dehydrotomatidine | 1.0000000 | 0.1958081 | 0.0724118 | 0.0705199 | 0.0800031 | 0.0856258 | 0.1091838 | 0.1248884 | 0.1239814 | 0.1096175 | 0.1463775 | 0.0640569 | 0.0706559 | 0.0534588 | 0.0700602 | 0.0660130 | 0.1444286 | 0.1236331 | 0.1257124 | 0.2328156 | 0.2119572 | 0.1693180 | 0.1973726 | 0.1778680 |
| Tomatidine | 0.1958081 | 1.0000000 | 0.5860685 | 0.0789416 | 0.5633672 | 0.5340258 | 0.1158963 | 0.1122517 | 0.1424779 | 0.1469736 | 0.1611836 | 0.0461304 | 0.0496523 | 0.1361824 | 0.0524480 | 0.0320171 | 0.0572057 | 0.0403493 | 0.0419116 | 0.0323270 | 0.0410946 | 0.0545631 | 0.0459817 | 0.2898556 |
| DehydrotomatineA1 | 0.0724118 | 0.5860685 | 1.0000000 | 0.2818199 | 0.9864355 | 0.9382021 | 0.0331233 | 0.2394422 | 0.1221723 | 0.3065069 | 0.2166712 | 0.2916249 | 0.2646223 | 0.3766102 | 0.2702264 | -0.0866433 | -0.1185372 | -0.1217159 | -0.1216872 | -0.1685617 | -0.1668972 | -0.1430407 | -0.1555893 | 0.5112946 |
| Dehydrotomatine2 | 0.0705199 | 0.0789416 | 0.2818199 | 1.0000000 | 0.4354934 | 0.1051570 | -0.0109944 | 0.8013982 | 0.1148049 | 0.7467082 | 0.4726344 | 0.9773513 | 0.9985487 | 0.9151758 | 0.9982811 | -0.1135963 | -0.1139857 | -0.1342242 | -0.1327240 | -0.1607342 | -0.1437631 | -0.1334054 | -0.1454483 | 0.7528223 |
| TotalDehydrotomatine | 0.0800031 | 0.5633672 | 0.9864355 | 0.4354934 | 1.0000000 | 0.8982311 | 0.0291960 | 0.3617561 | 0.1342658 | 0.4153210 | 0.2841456 | 0.4408177 | 0.4191099 | 0.5099155 | 0.4243220 | -0.1007251 | -0.1307151 | -0.1371600 | -0.1368764 | -0.1856471 | -0.1811820 | -0.1570272 | -0.1708610 | 0.6085030 |
| Tomatine | 0.0856258 | 0.5340258 | 0.9382021 | 0.1051570 | 0.8982311 | 1.0000000 | -0.0015510 | 0.0765479 | 0.0809241 | 0.1481210 | 0.1063700 | 0.1063834 | 0.0970628 | 0.2223864 | 0.1017999 | -0.1348184 | -0.1493455 | -0.1600657 | -0.1594540 | -0.1734284 | -0.1635850 | -0.1567053 | -0.1648607 | 0.3740744 |
| Hydroxytomatine1 | 0.1091838 | 0.1158963 | 0.0331233 | -0.0109944 | 0.0291960 | -0.0015510 | 1.0000000 | 0.2069522 | 0.9654454 | 0.5488552 | 0.8378693 | 0.0000567 | -0.0138284 | -0.0171833 | -0.0133994 | 0.0703478 | 0.0816724 | 0.0720805 | 0.0730705 | 0.0553339 | 0.0569084 | 0.0726778 | 0.0658671 | 0.1778832 |
| Hydroxytomatine2 | 0.1248884 | 0.1122517 | 0.2394422 | 0.8013982 | 0.3617561 | 0.0765479 | 0.2069522 | 1.0000000 | 0.2700617 | 0.8561187 | 0.6642823 | 0.8519328 | 0.8091936 | 0.8803927 | 0.8159471 | 0.2751955 | 0.2767988 | 0.2701918 | 0.2713272 | 0.1885897 | 0.1732515 | 0.2347645 | 0.2154994 | 0.8699286 |
| Hydroxytomatine3 | 0.1239814 | 0.1424779 | 0.1221723 | 0.1148049 | 0.1342658 | 0.0809241 | 0.9654454 | 0.2700617 | 1.0000000 | 0.6385122 | 0.8969458 | 0.1017829 | 0.1127336 | 0.1320528 | 0.1132673 | -0.0697310 | -0.0753197 | -0.0864902 | -0.0856876 | -0.0918256 | -0.0831342 | -0.0807035 | -0.0857253 | 0.2204869 |
| Hydroxytomatine4 | 0.1096175 | 0.1469736 | 0.3065069 | 0.7467082 | 0.4153210 | 0.1481210 | 0.5488552 | 0.8561187 | 0.6385122 | 1.0000000 | 0.9009765 | 0.7553073 | 0.7488537 | 0.7921486 | 0.7529894 | 0.0165520 | -0.0029602 | -0.0117509 | -0.0110035 | -0.0688381 | -0.0713697 | -0.0333669 | -0.0495522 | 0.7380949 |
| TotalHydroxytomatine | 0.1463775 | 0.1611836 | 0.2166712 | 0.4726344 | 0.2841456 | 0.1063700 | 0.8378693 | 0.6642823 | 0.8969458 | 0.9009765 | 1.0000000 | 0.4817615 | 0.4740211 | 0.5171793 | 0.4772983 | 0.0445803 | 0.0378604 | 0.0264609 | 0.0275158 | -0.0143059 | -0.0138350 | 0.0148815 | 0.0021843 | 0.5670118 |
| Acetoxytomatine1 | 0.0640569 | 0.0461304 | 0.2916249 | 0.9773513 | 0.4408177 | 0.1063834 | 0.0000567 | 0.8519328 | 0.1017829 | 0.7553073 | 0.4817615 | 1.0000000 | 0.9794336 | 0.9035689 | 0.9810958 | 0.0161189 | -0.0066834 | -0.0088030 | -0.0086351 | -0.0853359 | -0.0856655 | -0.0497913 | -0.0659978 | 0.8103828 |
| Acetoxytomatine2 | 0.0706559 | 0.0496523 | 0.2646223 | 0.9985487 | 0.4191099 | 0.0970628 | -0.0138284 | 0.8091936 | 0.1127336 | 0.7488537 | 0.4740211 | 0.9794336 | 1.0000000 | 0.9203234 | 0.9998823 | -0.1097445 | -0.1099837 | -0.1298928 | -0.1284126 | -0.1574876 | -0.1410966 | -0.1302652 | -0.1422758 | 0.7532965 |
| Acetoxytomatine3 | 0.0534588 | 0.1361824 | 0.3766102 | 0.9151758 | 0.5099155 | 0.2223864 | -0.0171833 | 0.8803927 | 0.1320528 | 0.7921486 | 0.5171793 | 0.9035689 | 0.9203234 | 1.0000000 | 0.9252208 | -0.0774208 | -0.0847509 | -0.0998221 | -0.0987046 | -0.1351296 | -0.1243172 | -0.1064610 | -0.1193145 | 0.7712523 |
| TotalAcetoxytomatine | 0.0700602 | 0.0524480 | 0.2702264 | 0.9982811 | 0.4243220 | 0.1017999 | -0.0133994 | 0.8159471 | 0.1132673 | 0.7529894 | 0.4772983 | 0.9810958 | 0.9998823 | 0.9252208 | 1.0000000 | -0.1037893 | -0.1052035 | -0.1242768 | -0.1228584 | -0.1542633 | -0.1386987 | -0.1265554 | -0.1388088 | 0.7587569 |
| DehydrolycoperosideFGdehydroesculeosideA | 0.0660130 | 0.0320171 | -0.0866433 | -0.1135963 | -0.1007251 | -0.1348184 | 0.0703478 | 0.2751955 | -0.0697310 | 0.0165520 | 0.0445803 | 0.0161189 | -0.1097445 | -0.0774208 | -0.1037893 | 1.0000000 | 0.8984623 | 0.9407488 | 0.9389721 | 0.7499837 | 0.6492439 | 0.8289141 | 0.7943348 | 0.4024231 |
| LycoperosideFGEsculeosideA1 | 0.1444286 | 0.0572057 | -0.1185372 | -0.1139857 | -0.1307151 | -0.1493455 | 0.0816724 | 0.2767988 | -0.0753197 | -0.0029602 | 0.0378604 | -0.0066834 | -0.1099837 | -0.0847509 | -0.1052035 | 0.8984623 | 1.0000000 | 0.9743469 | 0.9786019 | 0.8933985 | 0.8299445 | 0.9528679 | 0.9310481 | 0.4179792 |
| LycoperosideFGEsculeosideA2 | 0.1236331 | 0.0403493 | -0.1217159 | -0.1342242 | -0.1371600 | -0.1600657 | 0.0720805 | 0.2701918 | -0.0864902 | -0.0117509 | 0.0264609 | -0.0088030 | -0.1298928 | -0.0998221 | -0.1242768 | 0.9407488 | 0.9743469 | 1.0000000 | 0.9998049 | 0.8573587 | 0.7710545 | 0.9157869 | 0.8922558 | 0.4088272 |
| TotalLycoperosideFGEsculeosideA | 0.1257124 | 0.0419116 | -0.1216872 | -0.1327240 | -0.1368764 | -0.1594540 | 0.0730705 | 0.2713272 | -0.0856876 | -0.0110035 | 0.0275158 | -0.0086351 | -0.1284126 | -0.0987046 | -0.1228584 | 0.9389721 | 0.9786019 | 0.9998049 | 1.0000000 | 0.8622847 | 0.7778085 | 0.9209244 | 0.8974951 | 0.4104711 |
| EsculeosideB1 | 0.2328156 | 0.0323270 | -0.1685617 | -0.1607342 | -0.1856471 | -0.1734284 | 0.0553339 | 0.1885897 | -0.0918256 | -0.0688381 | -0.0143059 | -0.0853359 | -0.1574876 | -0.1351296 | -0.1542633 | 0.7499837 | 0.8933985 | 0.8573587 | 0.8622847 | 1.0000000 | 0.9752093 | 0.9694447 | 0.9905730 | 0.3055147 |
| EsculeosideB2 | 0.2119572 | 0.0410946 | -0.1668972 | -0.1437631 | -0.1811820 | -0.1635850 | 0.0569084 | 0.1732515 | -0.0831342 | -0.0713697 | -0.0138350 | -0.0856655 | -0.1410966 | -0.1243172 | -0.1386987 | 0.6492439 | 0.8299445 | 0.7710545 | 0.7778085 | 0.9752093 | 1.0000000 | 0.9343539 | 0.9635943 | 0.2748309 |
| EsculeosideB3 | 0.1693180 | 0.0545631 | -0.1430407 | -0.1334054 | -0.1570272 | -0.1567053 | 0.0726778 | 0.2347645 | -0.0807035 | -0.0333669 | 0.0148815 | -0.0497913 | -0.1302652 | -0.1064610 | -0.1265554 | 0.8289141 | 0.9528679 | 0.9157869 | 0.9209244 | 0.9694447 | 0.9343539 | 1.0000000 | 0.9936469 | 0.3675321 |
| TotalEsculeosideB | 0.1973726 | 0.0459817 | -0.1555893 | -0.1454483 | -0.1708610 | -0.1648607 | 0.0658671 | 0.2154994 | -0.0857253 | -0.0495522 | 0.0021843 | -0.0659978 | -0.1422758 | -0.1193145 | -0.1388088 | 0.7943348 | 0.9310481 | 0.8922558 | 0.8974951 | 0.9905730 | 0.9635943 | 0.9936469 | 1.0000000 | 0.3413784 |
| Total | 0.1778680 | 0.2898556 | 0.5112946 | 0.7528223 | 0.6085030 | 0.3740744 | 0.1778832 | 0.8699286 | 0.2204869 | 0.7380949 | 0.5670118 | 0.8103828 | 0.7532965 | 0.7712523 | 0.7587569 | 0.4024231 | 0.4179792 | 0.4088272 | 0.4104711 | 0.3055147 | 0.2748309 | 0.3675321 | 0.3413784 | 1.0000000 |
# run cor.mtest to get pvalues and CI for each pair of inputs
allisomers_cor_mtest <- cor.mtest(Alkaloids_allisomers_corr_matrix,
conf.level = 0.95)
# save the pvalue matrix
allisomers_pval_matrix <- allisomers_cor_mtest$p
Prettying up the axis labels
axis_labels_allisomers <- c("Dehydrotomatidine",
"Tomatidine",
"Dehydrotomatine 1",
"Dehydrotomatidine 2",
"Total Dehydrotomatidine",
"Alpha-Tomatine",
"Hydroxytomatidine 1",
"Hydroxytomatidine 2",
"Hydroxytomatidine 3",
"Hydroxytomatidine 4",
"Total Hydroxytomatidine",
"Acetoxytomatidine 1",
"Acetoxytomatidine 2",
"Acetoxytomatidine 3",
"Total Acetoxytomatidine",
"Dehydrolycoperoside F/G/Dehydroesculeoside A",
"Lycoperoside F/G/Esculeoside A 1",
"Lycoperoside F/G/Esculeoside A 2",
"Total Lycoperoside F/G/Esculeoside A",
"Escueloside B 1",
"Escueloside B 2",
"Escueloside B 3",
"Total Escueloside B",
"Total SteroidalAlkaloids")
colnames(Alkaloids_allisomers_corr_matrix) <- axis_labels_allisomers %>% str_wrap(width = 24)
rownames(Alkaloids_allisomers_corr_matrix) <- axis_labels_allisomers %>% str_wrap(width = 24)
Create corrplot
corrplot_allisomers_fullpop <- corrplot(Alkaloids_allisomers_corr_matrix,
method = "circle",
p.mat = allisomers_pval_matrix,
insig = "label_sig",
type = "upper",
sig.level = c(.001, .01, .05),
outline = TRUE,
pch.cex = 0.5, # size of asterisks
pch.col = "white", # color of asterisks
tl.cex= 0.5, # size of axis text
tl.col="black", # color of axis text
title = "Full Population")
corrplot_allisomers_fullpop
## Dehydrotomatidine Tomatidine
## Dehydrotomatidine 1.00000000 0.19580805
## Tomatidine 0.19580805 1.00000000
## Dehydrotomatine 1 0.07241178 0.58606853
## Dehydrotomatidine 2 0.07051987 0.07894160
## Total Dehydrotomatidine 0.08000305 0.56336719
## Alpha-Tomatine 0.08562579 0.53402579
## Hydroxytomatidine 1 0.10918383 0.11589626
## Hydroxytomatidine 2 0.12488837 0.11225170
## Hydroxytomatidine 3 0.12398135 0.14247792
## Hydroxytomatidine 4 0.10961754 0.14697361
## Total Hydroxytomatidine 0.14637746 0.16118361
## Acetoxytomatidine 1 0.06405692 0.04613035
## Acetoxytomatidine 2 0.07065590 0.04965232
## Acetoxytomatidine 3 0.05345881 0.13618239
## Total Acetoxytomatidine 0.07006019 0.05244799
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.06601296 0.03201708
## Lycoperoside F/G/\nEsculeoside A 1 0.14442857 0.05720569
## Lycoperoside F/G/\nEsculeoside A 2 0.12363309 0.04034930
## Total Lycoperoside F/G/\nEsculeoside A 0.12571240 0.04191165
## Escueloside B 1 0.23281563 0.03232704
## Escueloside B 2 0.21195717 0.04109465
## Escueloside B 3 0.16931799 0.05456313
## Total Escueloside B 0.19737260 0.04598168
## Total SteroidalAlkaloids 0.17786796 0.28985563
## Dehydrotomatine 1
## Dehydrotomatidine 0.07241178
## Tomatidine 0.58606853
## Dehydrotomatine 1 1.00000000
## Dehydrotomatidine 2 0.28181994
## Total Dehydrotomatidine 0.98643545
## Alpha-Tomatine 0.93820206
## Hydroxytomatidine 1 0.03312334
## Hydroxytomatidine 2 0.23944223
## Hydroxytomatidine 3 0.12217225
## Hydroxytomatidine 4 0.30650687
## Total Hydroxytomatidine 0.21667116
## Acetoxytomatidine 1 0.29162490
## Acetoxytomatidine 2 0.26462231
## Acetoxytomatidine 3 0.37661020
## Total Acetoxytomatidine 0.27022641
## Dehydrolycoperoside F/G/\nDehydroesculeoside A -0.08664335
## Lycoperoside F/G/\nEsculeoside A 1 -0.11853716
## Lycoperoside F/G/\nEsculeoside A 2 -0.12171588
## Total Lycoperoside F/G/\nEsculeoside A -0.12168719
## Escueloside B 1 -0.16856173
## Escueloside B 2 -0.16689724
## Escueloside B 3 -0.14304066
## Total Escueloside B -0.15558932
## Total SteroidalAlkaloids 0.51129461
## Dehydrotomatidine 2
## Dehydrotomatidine 0.07051987
## Tomatidine 0.07894160
## Dehydrotomatine 1 0.28181994
## Dehydrotomatidine 2 1.00000000
## Total Dehydrotomatidine 0.43549336
## Alpha-Tomatine 0.10515696
## Hydroxytomatidine 1 -0.01099438
## Hydroxytomatidine 2 0.80139816
## Hydroxytomatidine 3 0.11480493
## Hydroxytomatidine 4 0.74670825
## Total Hydroxytomatidine 0.47263436
## Acetoxytomatidine 1 0.97735129
## Acetoxytomatidine 2 0.99854874
## Acetoxytomatidine 3 0.91517584
## Total Acetoxytomatidine 0.99828107
## Dehydrolycoperoside F/G/\nDehydroesculeoside A -0.11359627
## Lycoperoside F/G/\nEsculeoside A 1 -0.11398571
## Lycoperoside F/G/\nEsculeoside A 2 -0.13422417
## Total Lycoperoside F/G/\nEsculeoside A -0.13272398
## Escueloside B 1 -0.16073421
## Escueloside B 2 -0.14376312
## Escueloside B 3 -0.13340536
## Total Escueloside B -0.14544825
## Total SteroidalAlkaloids 0.75282232
## Total Dehydrotomatidine
## Dehydrotomatidine 0.08000305
## Tomatidine 0.56336719
## Dehydrotomatine 1 0.98643545
## Dehydrotomatidine 2 0.43549336
## Total Dehydrotomatidine 1.00000000
## Alpha-Tomatine 0.89823113
## Hydroxytomatidine 1 0.02919603
## Hydroxytomatidine 2 0.36175611
## Hydroxytomatidine 3 0.13426581
## Hydroxytomatidine 4 0.41532096
## Total Hydroxytomatidine 0.28414556
## Acetoxytomatidine 1 0.44081774
## Acetoxytomatidine 2 0.41910991
## Acetoxytomatidine 3 0.50991547
## Total Acetoxytomatidine 0.42432200
## Dehydrolycoperoside F/G/\nDehydroesculeoside A -0.10072509
## Lycoperoside F/G/\nEsculeoside A 1 -0.13071514
## Lycoperoside F/G/\nEsculeoside A 2 -0.13715996
## Total Lycoperoside F/G/\nEsculeoside A -0.13687639
## Escueloside B 1 -0.18564715
## Escueloside B 2 -0.18118200
## Escueloside B 3 -0.15702722
## Total Escueloside B -0.17086098
## Total SteroidalAlkaloids 0.60850304
## Alpha-Tomatine
## Dehydrotomatidine 0.08562579
## Tomatidine 0.53402579
## Dehydrotomatine 1 0.93820206
## Dehydrotomatidine 2 0.10515696
## Total Dehydrotomatidine 0.89823113
## Alpha-Tomatine 1.00000000
## Hydroxytomatidine 1 -0.00155102
## Hydroxytomatidine 2 0.07654785
## Hydroxytomatidine 3 0.08092407
## Hydroxytomatidine 4 0.14812102
## Total Hydroxytomatidine 0.10637004
## Acetoxytomatidine 1 0.10638341
## Acetoxytomatidine 2 0.09706283
## Acetoxytomatidine 3 0.22238636
## Total Acetoxytomatidine 0.10179991
## Dehydrolycoperoside F/G/\nDehydroesculeoside A -0.13481845
## Lycoperoside F/G/\nEsculeoside A 1 -0.14934552
## Lycoperoside F/G/\nEsculeoside A 2 -0.16006567
## Total Lycoperoside F/G/\nEsculeoside A -0.15945398
## Escueloside B 1 -0.17342845
## Escueloside B 2 -0.16358503
## Escueloside B 3 -0.15670526
## Total Escueloside B -0.16486072
## Total SteroidalAlkaloids 0.37407436
## Hydroxytomatidine 1
## Dehydrotomatidine 0.1091838282
## Tomatidine 0.1158962630
## Dehydrotomatine 1 0.0331233402
## Dehydrotomatidine 2 -0.0109943817
## Total Dehydrotomatidine 0.0291960338
## Alpha-Tomatine -0.0015510199
## Hydroxytomatidine 1 1.0000000000
## Hydroxytomatidine 2 0.2069521810
## Hydroxytomatidine 3 0.9654454421
## Hydroxytomatidine 4 0.5488552034
## Total Hydroxytomatidine 0.8378693298
## Acetoxytomatidine 1 0.0000566979
## Acetoxytomatidine 2 -0.0138283591
## Acetoxytomatidine 3 -0.0171833228
## Total Acetoxytomatidine -0.0133993766
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.0703477918
## Lycoperoside F/G/\nEsculeoside A 1 0.0816723804
## Lycoperoside F/G/\nEsculeoside A 2 0.0720804629
## Total Lycoperoside F/G/\nEsculeoside A 0.0730705038
## Escueloside B 1 0.0553338696
## Escueloside B 2 0.0569084056
## Escueloside B 3 0.0726778021
## Total Escueloside B 0.0658670825
## Total SteroidalAlkaloids 0.1778832251
## Hydroxytomatidine 2
## Dehydrotomatidine 0.12488837
## Tomatidine 0.11225170
## Dehydrotomatine 1 0.23944223
## Dehydrotomatidine 2 0.80139816
## Total Dehydrotomatidine 0.36175611
## Alpha-Tomatine 0.07654785
## Hydroxytomatidine 1 0.20695218
## Hydroxytomatidine 2 1.00000000
## Hydroxytomatidine 3 0.27006174
## Hydroxytomatidine 4 0.85611874
## Total Hydroxytomatidine 0.66428234
## Acetoxytomatidine 1 0.85193284
## Acetoxytomatidine 2 0.80919362
## Acetoxytomatidine 3 0.88039274
## Total Acetoxytomatidine 0.81594708
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.27519553
## Lycoperoside F/G/\nEsculeoside A 1 0.27679880
## Lycoperoside F/G/\nEsculeoside A 2 0.27019176
## Total Lycoperoside F/G/\nEsculeoside A 0.27132722
## Escueloside B 1 0.18858965
## Escueloside B 2 0.17325154
## Escueloside B 3 0.23476450
## Total Escueloside B 0.21549940
## Total SteroidalAlkaloids 0.86992862
## Hydroxytomatidine 3
## Dehydrotomatidine 0.12398135
## Tomatidine 0.14247792
## Dehydrotomatine 1 0.12217225
## Dehydrotomatidine 2 0.11480493
## Total Dehydrotomatidine 0.13426581
## Alpha-Tomatine 0.08092407
## Hydroxytomatidine 1 0.96544544
## Hydroxytomatidine 2 0.27006174
## Hydroxytomatidine 3 1.00000000
## Hydroxytomatidine 4 0.63851222
## Total Hydroxytomatidine 0.89694577
## Acetoxytomatidine 1 0.10178287
## Acetoxytomatidine 2 0.11273364
## Acetoxytomatidine 3 0.13205282
## Total Acetoxytomatidine 0.11326732
## Dehydrolycoperoside F/G/\nDehydroesculeoside A -0.06973100
## Lycoperoside F/G/\nEsculeoside A 1 -0.07531969
## Lycoperoside F/G/\nEsculeoside A 2 -0.08649015
## Total Lycoperoside F/G/\nEsculeoside A -0.08568765
## Escueloside B 1 -0.09182562
## Escueloside B 2 -0.08313422
## Escueloside B 3 -0.08070351
## Total Escueloside B -0.08572530
## Total SteroidalAlkaloids 0.22048692
## Hydroxytomatidine 4
## Dehydrotomatidine 0.109617539
## Tomatidine 0.146973607
## Dehydrotomatine 1 0.306506871
## Dehydrotomatidine 2 0.746708249
## Total Dehydrotomatidine 0.415320955
## Alpha-Tomatine 0.148121024
## Hydroxytomatidine 1 0.548855203
## Hydroxytomatidine 2 0.856118744
## Hydroxytomatidine 3 0.638512218
## Hydroxytomatidine 4 1.000000000
## Total Hydroxytomatidine 0.900976471
## Acetoxytomatidine 1 0.755307260
## Acetoxytomatidine 2 0.748853651
## Acetoxytomatidine 3 0.792148572
## Total Acetoxytomatidine 0.752989380
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.016551986
## Lycoperoside F/G/\nEsculeoside A 1 -0.002960218
## Lycoperoside F/G/\nEsculeoside A 2 -0.011750855
## Total Lycoperoside F/G/\nEsculeoside A -0.011003522
## Escueloside B 1 -0.068838132
## Escueloside B 2 -0.071369720
## Escueloside B 3 -0.033366923
## Total Escueloside B -0.049552236
## Total SteroidalAlkaloids 0.738094920
## Total Hydroxytomatidine
## Dehydrotomatidine 0.146377464
## Tomatidine 0.161183612
## Dehydrotomatine 1 0.216671156
## Dehydrotomatidine 2 0.472634361
## Total Dehydrotomatidine 0.284145556
## Alpha-Tomatine 0.106370043
## Hydroxytomatidine 1 0.837869330
## Hydroxytomatidine 2 0.664282337
## Hydroxytomatidine 3 0.896945769
## Hydroxytomatidine 4 0.900976471
## Total Hydroxytomatidine 1.000000000
## Acetoxytomatidine 1 0.481761484
## Acetoxytomatidine 2 0.474021078
## Acetoxytomatidine 3 0.517179337
## Total Acetoxytomatidine 0.477298283
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.044580274
## Lycoperoside F/G/\nEsculeoside A 1 0.037860385
## Lycoperoside F/G/\nEsculeoside A 2 0.026460923
## Total Lycoperoside F/G/\nEsculeoside A 0.027515791
## Escueloside B 1 -0.014305913
## Escueloside B 2 -0.013835024
## Escueloside B 3 0.014881543
## Total Escueloside B 0.002184304
## Total SteroidalAlkaloids 0.567011840
## Acetoxytomatidine 1
## Dehydrotomatidine 0.0640569248
## Tomatidine 0.0461303509
## Dehydrotomatine 1 0.2916249004
## Dehydrotomatidine 2 0.9773512874
## Total Dehydrotomatidine 0.4408177435
## Alpha-Tomatine 0.1063834072
## Hydroxytomatidine 1 0.0000566979
## Hydroxytomatidine 2 0.8519328365
## Hydroxytomatidine 3 0.1017828749
## Hydroxytomatidine 4 0.7553072601
## Total Hydroxytomatidine 0.4817614837
## Acetoxytomatidine 1 1.0000000000
## Acetoxytomatidine 2 0.9794335917
## Acetoxytomatidine 3 0.9035688644
## Total Acetoxytomatidine 0.9810957916
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.0161189221
## Lycoperoside F/G/\nEsculeoside A 1 -0.0066833751
## Lycoperoside F/G/\nEsculeoside A 2 -0.0088029884
## Total Lycoperoside F/G/\nEsculeoside A -0.0086350657
## Escueloside B 1 -0.0853359239
## Escueloside B 2 -0.0856655168
## Escueloside B 3 -0.0497912579
## Total Escueloside B -0.0659978150
## Total SteroidalAlkaloids 0.8103828276
## Acetoxytomatidine 2
## Dehydrotomatidine 0.07065590
## Tomatidine 0.04965232
## Dehydrotomatine 1 0.26462231
## Dehydrotomatidine 2 0.99854874
## Total Dehydrotomatidine 0.41910991
## Alpha-Tomatine 0.09706283
## Hydroxytomatidine 1 -0.01382836
## Hydroxytomatidine 2 0.80919362
## Hydroxytomatidine 3 0.11273364
## Hydroxytomatidine 4 0.74885365
## Total Hydroxytomatidine 0.47402108
## Acetoxytomatidine 1 0.97943359
## Acetoxytomatidine 2 1.00000000
## Acetoxytomatidine 3 0.92032342
## Total Acetoxytomatidine 0.99988232
## Dehydrolycoperoside F/G/\nDehydroesculeoside A -0.10974450
## Lycoperoside F/G/\nEsculeoside A 1 -0.10998373
## Lycoperoside F/G/\nEsculeoside A 2 -0.12989283
## Total Lycoperoside F/G/\nEsculeoside A -0.12841264
## Escueloside B 1 -0.15748758
## Escueloside B 2 -0.14109664
## Escueloside B 3 -0.13026519
## Total Escueloside B -0.14227579
## Total SteroidalAlkaloids 0.75329651
## Acetoxytomatidine 3
## Dehydrotomatidine 0.05345881
## Tomatidine 0.13618239
## Dehydrotomatine 1 0.37661020
## Dehydrotomatidine 2 0.91517584
## Total Dehydrotomatidine 0.50991547
## Alpha-Tomatine 0.22238636
## Hydroxytomatidine 1 -0.01718332
## Hydroxytomatidine 2 0.88039274
## Hydroxytomatidine 3 0.13205282
## Hydroxytomatidine 4 0.79214857
## Total Hydroxytomatidine 0.51717934
## Acetoxytomatidine 1 0.90356886
## Acetoxytomatidine 2 0.92032342
## Acetoxytomatidine 3 1.00000000
## Total Acetoxytomatidine 0.92522079
## Dehydrolycoperoside F/G/\nDehydroesculeoside A -0.07742075
## Lycoperoside F/G/\nEsculeoside A 1 -0.08475092
## Lycoperoside F/G/\nEsculeoside A 2 -0.09982207
## Total Lycoperoside F/G/\nEsculeoside A -0.09870464
## Escueloside B 1 -0.13512963
## Escueloside B 2 -0.12431715
## Escueloside B 3 -0.10646100
## Total Escueloside B -0.11931451
## Total SteroidalAlkaloids 0.77125232
## Total Acetoxytomatidine
## Dehydrotomatidine 0.07006019
## Tomatidine 0.05244799
## Dehydrotomatine 1 0.27022641
## Dehydrotomatidine 2 0.99828107
## Total Dehydrotomatidine 0.42432200
## Alpha-Tomatine 0.10179991
## Hydroxytomatidine 1 -0.01339938
## Hydroxytomatidine 2 0.81594708
## Hydroxytomatidine 3 0.11326732
## Hydroxytomatidine 4 0.75298938
## Total Hydroxytomatidine 0.47729828
## Acetoxytomatidine 1 0.98109579
## Acetoxytomatidine 2 0.99988232
## Acetoxytomatidine 3 0.92522079
## Total Acetoxytomatidine 1.00000000
## Dehydrolycoperoside F/G/\nDehydroesculeoside A -0.10378930
## Lycoperoside F/G/\nEsculeoside A 1 -0.10520353
## Lycoperoside F/G/\nEsculeoside A 2 -0.12427680
## Total Lycoperoside F/G/\nEsculeoside A -0.12285842
## Escueloside B 1 -0.15426327
## Escueloside B 2 -0.13869873
## Escueloside B 3 -0.12655539
## Total Escueloside B -0.13880876
## Total SteroidalAlkaloids 0.75875692
## Dehydrolycoperoside F/G/\nDehydroesculeoside A
## Dehydrotomatidine 0.06601296
## Tomatidine 0.03201708
## Dehydrotomatine 1 -0.08664335
## Dehydrotomatidine 2 -0.11359627
## Total Dehydrotomatidine -0.10072509
## Alpha-Tomatine -0.13481845
## Hydroxytomatidine 1 0.07034779
## Hydroxytomatidine 2 0.27519553
## Hydroxytomatidine 3 -0.06973100
## Hydroxytomatidine 4 0.01655199
## Total Hydroxytomatidine 0.04458027
## Acetoxytomatidine 1 0.01611892
## Acetoxytomatidine 2 -0.10974450
## Acetoxytomatidine 3 -0.07742075
## Total Acetoxytomatidine -0.10378930
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 1.00000000
## Lycoperoside F/G/\nEsculeoside A 1 0.89846235
## Lycoperoside F/G/\nEsculeoside A 2 0.94074883
## Total Lycoperoside F/G/\nEsculeoside A 0.93897211
## Escueloside B 1 0.74998375
## Escueloside B 2 0.64924390
## Escueloside B 3 0.82891405
## Total Escueloside B 0.79433475
## Total SteroidalAlkaloids 0.40242306
## Lycoperoside F/G/\nEsculeoside A 1
## Dehydrotomatidine 0.144428573
## Tomatidine 0.057205694
## Dehydrotomatine 1 -0.118537156
## Dehydrotomatidine 2 -0.113985706
## Total Dehydrotomatidine -0.130715137
## Alpha-Tomatine -0.149345519
## Hydroxytomatidine 1 0.081672380
## Hydroxytomatidine 2 0.276798803
## Hydroxytomatidine 3 -0.075319695
## Hydroxytomatidine 4 -0.002960218
## Total Hydroxytomatidine 0.037860385
## Acetoxytomatidine 1 -0.006683375
## Acetoxytomatidine 2 -0.109983729
## Acetoxytomatidine 3 -0.084750923
## Total Acetoxytomatidine -0.105203527
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.898462346
## Lycoperoside F/G/\nEsculeoside A 1 1.000000000
## Lycoperoside F/G/\nEsculeoside A 2 0.974346889
## Total Lycoperoside F/G/\nEsculeoside A 0.978601873
## Escueloside B 1 0.893398451
## Escueloside B 2 0.829944521
## Escueloside B 3 0.952867917
## Total Escueloside B 0.931048129
## Total SteroidalAlkaloids 0.417979153
## Lycoperoside F/G/\nEsculeoside A 2
## Dehydrotomatidine 0.123633090
## Tomatidine 0.040349303
## Dehydrotomatine 1 -0.121715880
## Dehydrotomatidine 2 -0.134224167
## Total Dehydrotomatidine -0.137159961
## Alpha-Tomatine -0.160065674
## Hydroxytomatidine 1 0.072080463
## Hydroxytomatidine 2 0.270191759
## Hydroxytomatidine 3 -0.086490154
## Hydroxytomatidine 4 -0.011750855
## Total Hydroxytomatidine 0.026460923
## Acetoxytomatidine 1 -0.008802988
## Acetoxytomatidine 2 -0.129892834
## Acetoxytomatidine 3 -0.099822065
## Total Acetoxytomatidine -0.124276805
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.940748826
## Lycoperoside F/G/\nEsculeoside A 1 0.974346889
## Lycoperoside F/G/\nEsculeoside A 2 1.000000000
## Total Lycoperoside F/G/\nEsculeoside A 0.999804924
## Escueloside B 1 0.857358670
## Escueloside B 2 0.771054522
## Escueloside B 3 0.915786872
## Total Escueloside B 0.892255795
## Total SteroidalAlkaloids 0.408827247
## Total Lycoperoside F/G/\nEsculeoside A
## Dehydrotomatidine 0.125712403
## Tomatidine 0.041911649
## Dehydrotomatine 1 -0.121687192
## Dehydrotomatidine 2 -0.132723980
## Total Dehydrotomatidine -0.136876387
## Alpha-Tomatine -0.159453984
## Hydroxytomatidine 1 0.073070504
## Hydroxytomatidine 2 0.271327220
## Hydroxytomatidine 3 -0.085687648
## Hydroxytomatidine 4 -0.011003522
## Total Hydroxytomatidine 0.027515791
## Acetoxytomatidine 1 -0.008635066
## Acetoxytomatidine 2 -0.128412645
## Acetoxytomatidine 3 -0.098704637
## Total Acetoxytomatidine -0.122858422
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.938972108
## Lycoperoside F/G/\nEsculeoside A 1 0.978601873
## Lycoperoside F/G/\nEsculeoside A 2 0.999804924
## Total Lycoperoside F/G/\nEsculeoside A 1.000000000
## Escueloside B 1 0.862284657
## Escueloside B 2 0.777808453
## Escueloside B 3 0.920924392
## Total Escueloside B 0.897495116
## Total SteroidalAlkaloids 0.410471134
## Escueloside B 1 Escueloside B 2
## Dehydrotomatidine 0.23281563 0.21195717
## Tomatidine 0.03232704 0.04109465
## Dehydrotomatine 1 -0.16856173 -0.16689724
## Dehydrotomatidine 2 -0.16073421 -0.14376312
## Total Dehydrotomatidine -0.18564715 -0.18118200
## Alpha-Tomatine -0.17342845 -0.16358503
## Hydroxytomatidine 1 0.05533387 0.05690841
## Hydroxytomatidine 2 0.18858965 0.17325154
## Hydroxytomatidine 3 -0.09182562 -0.08313422
## Hydroxytomatidine 4 -0.06883813 -0.07136972
## Total Hydroxytomatidine -0.01430591 -0.01383502
## Acetoxytomatidine 1 -0.08533592 -0.08566552
## Acetoxytomatidine 2 -0.15748758 -0.14109664
## Acetoxytomatidine 3 -0.13512963 -0.12431715
## Total Acetoxytomatidine -0.15426327 -0.13869873
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.74998375 0.64924390
## Lycoperoside F/G/\nEsculeoside A 1 0.89339845 0.82994452
## Lycoperoside F/G/\nEsculeoside A 2 0.85735867 0.77105452
## Total Lycoperoside F/G/\nEsculeoside A 0.86228466 0.77780845
## Escueloside B 1 1.00000000 0.97520927
## Escueloside B 2 0.97520927 1.00000000
## Escueloside B 3 0.96944469 0.93435394
## Total Escueloside B 0.99057297 0.96359429
## Total SteroidalAlkaloids 0.30551468 0.27483094
## Escueloside B 3
## Dehydrotomatidine 0.16931799
## Tomatidine 0.05456313
## Dehydrotomatine 1 -0.14304066
## Dehydrotomatidine 2 -0.13340536
## Total Dehydrotomatidine -0.15702722
## Alpha-Tomatine -0.15670526
## Hydroxytomatidine 1 0.07267780
## Hydroxytomatidine 2 0.23476450
## Hydroxytomatidine 3 -0.08070351
## Hydroxytomatidine 4 -0.03336692
## Total Hydroxytomatidine 0.01488154
## Acetoxytomatidine 1 -0.04979126
## Acetoxytomatidine 2 -0.13026519
## Acetoxytomatidine 3 -0.10646100
## Total Acetoxytomatidine -0.12655539
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.82891405
## Lycoperoside F/G/\nEsculeoside A 1 0.95286792
## Lycoperoside F/G/\nEsculeoside A 2 0.91578687
## Total Lycoperoside F/G/\nEsculeoside A 0.92092439
## Escueloside B 1 0.96944469
## Escueloside B 2 0.93435394
## Escueloside B 3 1.00000000
## Total Escueloside B 0.99364689
## Total SteroidalAlkaloids 0.36753214
## Total Escueloside B
## Dehydrotomatidine 0.197372597
## Tomatidine 0.045981680
## Dehydrotomatine 1 -0.155589315
## Dehydrotomatidine 2 -0.145448253
## Total Dehydrotomatidine -0.170860976
## Alpha-Tomatine -0.164860723
## Hydroxytomatidine 1 0.065867082
## Hydroxytomatidine 2 0.215499402
## Hydroxytomatidine 3 -0.085725303
## Hydroxytomatidine 4 -0.049552236
## Total Hydroxytomatidine 0.002184304
## Acetoxytomatidine 1 -0.065997815
## Acetoxytomatidine 2 -0.142275790
## Acetoxytomatidine 3 -0.119314514
## Total Acetoxytomatidine -0.138808756
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.794334751
## Lycoperoside F/G/\nEsculeoside A 1 0.931048129
## Lycoperoside F/G/\nEsculeoside A 2 0.892255795
## Total Lycoperoside F/G/\nEsculeoside A 0.897495116
## Escueloside B 1 0.990572972
## Escueloside B 2 0.963594287
## Escueloside B 3 0.993646894
## Total Escueloside B 1.000000000
## Total SteroidalAlkaloids 0.341378371
## Total SteroidalAlkaloids
## Dehydrotomatidine 0.1778680
## Tomatidine 0.2898556
## Dehydrotomatine 1 0.5112946
## Dehydrotomatidine 2 0.7528223
## Total Dehydrotomatidine 0.6085030
## Alpha-Tomatine 0.3740744
## Hydroxytomatidine 1 0.1778832
## Hydroxytomatidine 2 0.8699286
## Hydroxytomatidine 3 0.2204869
## Hydroxytomatidine 4 0.7380949
## Total Hydroxytomatidine 0.5670118
## Acetoxytomatidine 1 0.8103828
## Acetoxytomatidine 2 0.7532965
## Acetoxytomatidine 3 0.7712523
## Total Acetoxytomatidine 0.7587569
## Dehydrolycoperoside F/G/\nDehydroesculeoside A 0.4024231
## Lycoperoside F/G/\nEsculeoside A 1 0.4179792
## Lycoperoside F/G/\nEsculeoside A 2 0.4088272
## Total Lycoperoside F/G/\nEsculeoside A 0.4104711
## Escueloside B 1 0.3055147
## Escueloside B 2 0.2748309
## Escueloside B 3 0.3675321
## Total Escueloside B 0.3413784
## Total SteroidalAlkaloids 1.0000000